diff --git a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs index a4d163e2a..c925bd78e 100644 --- a/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs +++ b/be/DataExchange/Fawtyg/Win_in.Sfs.Wms.DataExchange.Fawtyg.EosAgent/FawtygAutoMapperProfile.cs @@ -86,7 +86,7 @@ public class FawtygAutoMapperProfile : Profile CreateMap() .ForMember(x => x.Code, y => y.MapFrom(d => d.PackingCode)) - .ForMember(x => x.LabelType, y => y.MapFrom(d => EnumLabelType.PurchaseLabel)) + .ForMember(x => x.LabelType, y => y.MapFrom(d => Label.Domain.Shared.EnumLabelType.PurchaseLabel)) .ForMember(x => x.LabelStatus, y => y.MapFrom(d => LabelStatus.Enable)) .Ignore(x => x.FullBarcodeString) .Ignore(x => x.RecommendLocationCode) diff --git a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs index 0df247f7f..e0ccaa4bf 100644 --- a/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs +++ b/be/Hosts/WmsPda.Host/Win_in.Sfs.Wms.Pda.Host/Controllers/Stores/PurchaseReturnRequestController.cs @@ -33,7 +33,7 @@ public class PurchaseReturnRequestController : AbpController /// 创建退货申请 /// [HttpPost("create-many")] - public virtual async Task CreateManyAsync(List input) + public virtual async Task CreateManyAsync(List input) { List entitys = new List(); var groups = input.GroupBy(r => r.AsnNumber).ToList(); @@ -50,8 +50,9 @@ public class PurchaseReturnRequestController : AbpController } entitys.Add(entity); } - await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); ; - } + await _purchaseReturnRequestAppService.CreateManyAsync(entitys).ConfigureAwait(false); + return Ok(); + } /// /// 赋值Request业务属性 diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs index 8c6c78a4f..1084d0dbd 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Boms/IBomAppService.cs @@ -33,4 +33,13 @@ public interface IBomAppService Task> GetListOfComponentAsync(string component); Task AddOrUpsertListAsync(List inputs); Task UpsertAsyncByInterface(BomEditInput input); + + /// + /// 根据总成号、总成数量取所有子物料及其汇总数量 + /// + /// 总成号 + /// 总成数量 + /// + Task> GetMaterialTotalQtyAsync(string productCode, int productNum); + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs similarity index 96% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs index 57dcc7553..c0d83cfb7 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Dtos/SplitPackingRecDto.cs @@ -5,10 +5,11 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Label.Domain.Shared; -using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Basedata.Domain.Shared; + +namespace Win_in.Sfs.Basedata.Application.Contracts; -namespace Win_in.Sfs.Wms.Store.SplitPackings; public class SplitPackingRecDTO : SfsBaseDataDTOBase { /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs new file mode 100644 index 000000000..b36056209 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Shared.Application.Contracts; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +public interface ISplitPackingRecAppService + : ISfsBaseDataAppServiceBase +{ + Task BatchInsertAsync(List inputs); + + /// + /// 取每个目标箱码的最后一条拆箱记录 + /// + /// 目标箱码列表 + /// + Task> GetListByToPackingCode(List toPackingCodeList); + + /// + /// 取每个源标箱码的“操作状态=其它”的拆箱记录 + /// + /// 源标箱码列表 + /// + Task> GetListByFromPackingCode(List fromPackingCodeList); + +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs similarity index 97% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs index 1c9e5350a..595d7a362 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecEditInput.cs @@ -5,11 +5,12 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Label.Domain.Shared; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; -namespace Win_in.Sfs.Wms.Store.SplitPackings; +namespace Win_in.Sfs.Basedata.Application.Contracts; + public class SplitPackingRecEditInput : SfsBaseDataCreateOrUpdateInputBase { diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs similarity index 54% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs index 12c9827ea..ca7f851f0 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/SplitPackings/Inputs/SplitPackingRecImportInput.cs @@ -4,11 +4,11 @@ using System.ComponentModel.DataAnnotations; using System.Linq; using System.Text; using System.Threading.Tasks; -using Win_in.Sfs.Wms.Store.Application.Contracts; -namespace Win_in.Sfs.Wms.Store.SplitPackings.Inputs; +namespace Win_in.Sfs.Basedata.Application.Contracts; + [Display(Name = "拆箱记录")] -public class SplitPackingRecImportInput : SfsStoreImportInputBase +public class SplitPackingRecImportInput : SfsBaseDataImportInputBase { } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs index 47c444e43..9f75a7fb0 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/BasedataApplicationAutoMapperProfile.cs @@ -50,7 +50,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile WorkGroupAutoMapperProfile(); WorkShopAutoMapperProfile(); EquipmentAutoMapperProfile(); - EquipmentAreaAutoMapperProfile(); + SplitPackingRecAutoMapperProfile(); KittingAutoMapperProfile(); } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs index 47cce0cf7..ec2e12831 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/Boms/BomAppService.cs @@ -182,4 +182,20 @@ public class BomAppService : await base.CheckProductAsync(importInput.Product, validationRresult).ConfigureAwait(false); await base.CheckComponentAndComponentQtyAsync(importInput.Component, importInput.ComponentQty, validationRresult).ConfigureAwait(false); } + + /// + /// 根据总成号、总成数量取所有子物料及其汇总数量 + /// + /// 总成号 + /// 总成数量 + /// + [HttpGet("get-material-total-qty")] + public virtual async Task> GetMaterialTotalQtyAsync(string productCode, int productNum) + { + var entities = await _bomManager.GetMaterialTotalQtyAsync(productCode, productNum).ConfigureAwait(false); + return ObjectMapper.Map, List>(entities); + + } + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs new file mode 100644 index 000000000..9a12c4c3b --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAppService.cs @@ -0,0 +1,66 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components; +using Volo.Abp.Caching; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Basedata.Domain.Shared; + +namespace Win_in.Sfs.Basedata.Application; + +/// +/// 拆箱记录 +/// +//[Authorize] +[Route($"{BasedataConsts.RootPath}split-packing-rec")] +public class SplitPackingRecAppService : + SfsBaseDataAppServiceBase + , ISplitPackingRecAppService +{ + private readonly ISplitPackingRecManager _splitPackingRecManager; + + public SplitPackingRecAppService(ISplitPackingRecRepository repository + ,ISplitPackingRecManager splitPackingRecManager + ,IDistributedCache cache + ) : base(repository, cache) + { + _splitPackingRecManager = splitPackingRecManager; + } + + public async Task BatchInsertAsync(List inputs) + { + List lst = ObjectMapper.Map, List>(inputs); + bool ret = await _splitPackingRecManager.BatchInsertAsync(lst).ConfigureAwait(false); + return ret; + } + + /// + /// 取每个目标箱码的最后一条拆箱记录 + /// + /// 目标箱码列表 + /// + public async Task> GetListByToPackingCode(List toPackingCodeList) + { + var lst = await _splitPackingRecManager.GetListByToPackingCode(toPackingCodeList).ConfigureAwait(false); + List ret = ObjectMapper.Map, List>(lst); + return ret; + } + + /// + /// 取每个源标箱码的“操作状态=其它”的拆箱记录 + /// + /// 源标箱码列表 + /// + public async Task> GetListByFromPackingCode(List fromPackingCodeList) + { + var lst = await _splitPackingRecManager.GetListByFromPackingCode(fromPackingCodeList).ConfigureAwait(false); + List ret = ObjectMapper.Map, List>(lst); + return ret; + } + + +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs new file mode 100644 index 000000000..dc89749ef --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs @@ -0,0 +1,23 @@ +using AutoMapper; +using Volo.Abp.AutoMapper; +using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain; + +namespace Win_in.Sfs.Basedata.Application; + +public partial class BasedataApplicationAutoMapperProfile : Profile +{ + private void SplitPackingRecAutoMapperProfile() + { + CreateMap(); + CreateMap() + .Ignore(t => t.FromTopPackingCode) + .Ignore(t => t.ToTopPackingCode) + .Ignore(t => t.LastModificationTime) + .Ignore(t => t.LastModifierId) + .Ignore(t => t.CreationTime) + .Ignore(t => t.CreatorId) + .Ignore(t => t.ConcurrencyStamp) + .Ignore(t => t.Id); + } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/CommonHelper.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs similarity index 92% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/CommonHelper.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs index 5d613d7db..4f8e1c8b5 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/CommonHelper.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/CommonHelper.cs @@ -5,7 +5,7 @@ using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; -namespace Win_in.Sfs.Wms.Store.Commons; +namespace Win_in.Sfs.Basedata.Domain.Shared; public sealed class CommonHelper { /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/ExtMethod.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/ExtMethod.cs similarity index 99% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/ExtMethod.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/ExtMethod.cs index 420078787..c2d021ad4 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/Commons/ExtMethod.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Commons/ExtMethod.cs @@ -5,7 +5,7 @@ using System.Linq; using System.Reflection; using System.Text; -namespace Win_in.Sfs.Wms.Store.Commons; +namespace Win_in.Sfs.Basedata.Domain.Shared; public static class ExtMethod { #region string diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/NodeTypeEnum.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/NodeTypeEnum.cs similarity index 74% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/NodeTypeEnum.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/NodeTypeEnum.cs index 487dccc08..096543b45 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/NodeTypeEnum.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/NodeTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; +namespace Win_in.Sfs.Basedata.Domain.Shared; public enum NodeTypeEnum { ToBox = 1, diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/OprTypeEnum.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/OprTypeEnum.cs similarity index 85% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/OprTypeEnum.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/OprTypeEnum.cs index 667741dd6..e87cd6f40 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain.Shared/SplitPackings/OprTypeEnum.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/SplitPackings/OprTypeEnum.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Text; using System.Threading.Tasks; -namespace Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; +namespace Win_in.Sfs.Basedata.Domain.Shared; public enum OprTypeEnum { /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj index d91c02e6c..3221d386c 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain.Shared/Win_in.Sfs.Basedata.Domain.Shared.csproj @@ -9,6 +9,7 @@ + diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs index 4d16dffe3..2be49a698 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/BomManager.cs @@ -193,4 +193,24 @@ public class BomManager : DomainService, IBomManager { return await _repository.GetListAsync(p => p.Component == component).ConfigureAwait(false); } + + /// + /// 根据总成号、总成数量取所有子物料及其汇总数量 + /// + /// 总成号 + /// 总成数量 + /// + public virtual async Task> GetMaterialTotalQtyAsync(string productCode, int productNum) + { + if (productNum < 1) + { + throw new UserFriendlyException("productNum参数值必须大于等于1"); + } + var lst = await _repository.GetListAsync(p => p.Product == productCode).ConfigureAwait(false); + foreach (var item in lst) + { + item.ComponentQty = item.ComponentQty * productNum; + } + return lst; + } } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs index 774719525..9687f556e 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/Boms/IBomManager.cs @@ -32,4 +32,13 @@ public interface IBomManager : IDomainService, IBulkImportService Task> GetListOfProductAsync(string product); Task> GetListWithPhantomItemAsync(string productItemCode, string mfgOp, DateTime validTime, bool onlyFromProductionPlan); + + /// + /// 根据总成号、总成数量取所有子物料及其汇总数量 + /// + /// 总成号 + /// 总成数量 + /// + Task> GetMaterialTotalQtyAsync(string productCode, int productNum); + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecManager.cs new file mode 100644 index 000000000..4ce568e61 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecManager.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Basedata.Domain; +public interface ISplitPackingRecManager : IDomainService +{ + Task BatchInsertAsync(List input); + + /// + /// 取每个目标箱码的最后一条拆箱记录 + /// + /// 目标箱码列表 + /// + Task> GetListByToPackingCode(List toPackingCodeList); + + /// + /// 取每个源标箱码的“操作状态=其它”的拆箱记录 + /// + /// 源标箱码列表 + /// + Task> GetListByFromPackingCode(List fromPackingCodeList); + +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecRepository.cs new file mode 100644 index 000000000..9a362d808 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/ISplitPackingRecRepository.cs @@ -0,0 +1,9 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Domain; + +public interface ISplitPackingRecRepository : ISfsBaseDataRepositoryBase +{ +} + + diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRec.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs similarity index 77% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRec.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs index ba09ac382..5937bd856 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRec.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRec.cs @@ -1,17 +1,16 @@ using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; -using Win_in.Sfs.Label.Domain.Shared; +using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Shared.Domain; using Win_in.Sfs.Shared.Domain.Shared; -using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; -namespace Win_in.Sfs.Wms.Store.Domain; +namespace Win_in.Sfs.Basedata.Domain; /// /// 采购标签 /// -public class SplitPackingRec : SfsAggregateRootBase +public class SplitPackingRec : SfsBaseDataAggregateRootBase , IHasItem { /// @@ -143,3 +142,45 @@ public class SplitPackingRec : SfsAggregateRootBase public EnumLabelType LabelType { get; set; } } + +/// +/// 标签类别 +/// +public enum EnumLabelType +{ + /// + /// 空枚举 + /// + [Display(Name = "未定义")] + None = 0, + + /// + /// 采购标签 + /// + [Display(Name = "采购标签")] + PurchaseLabel = 1, + + /// + /// 生产标签 + /// + [Display(Name = "生产标签")] + ProductionLabel = 2, + + /// + /// 销售标签 + /// + [Display(Name = "销售标签")] + SaleLabel = 3, + + /// + /// 托盘标签 + /// + [Display(Name = "托盘标签")] + PalletLabel = 4, + + /// + /// 盘点标签 + /// + [Display(Name = "盘点标签")] + CountLabel = 5, +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRecManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs similarity index 77% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRecManager.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs index 7fb3c45d0..fec61d5b1 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/SplitPackingRecManager.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/SplitPackings/SplitPackingRecManager.cs @@ -1,18 +1,14 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; using System.Threading.Tasks; using Microsoft.EntityFrameworkCore; using Volo.Abp; using Volo.Abp.Domain.Services; using Volo.Abp.ObjectMapping; -using Win_in.Sfs.Label.Domain; -using Win_in.Sfs.Wms.Store.Commons; -using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared.SplitPackings; +using Win_in.Sfs.Basedata.Domain.Shared; -namespace Win_in.Sfs.Wms.Store.SplitPackings; +namespace Win_in.Sfs.Basedata.Domain; public class SplitPackingRecManager : DomainService, ISplitPackingRecManager { private readonly ISplitPackingRecRepository _repository; @@ -102,6 +98,54 @@ public class SplitPackingRecManager : DomainService, ISplitPackingRecManager return true; } + /// + /// 取每个目标箱码的最后一条拆箱记录 + /// + /// 目标箱码列表 + /// + public async Task> GetListByToPackingCode(List toPackingCodeList) + { + List ret = new List(); + List lst = await _repository.GetListAsync( + itm => toPackingCodeList.Contains(itm.ToPackingCode) + && itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false); + + foreach (string toCode in toPackingCodeList) + { + var obj = lst.Where(itm => itm.ToPackingCode == toCode) + .OrderByDescending(itm => itm.CreationTime).FirstOrDefault(); + if (obj != null) + { + ret.Add(obj); + } + } + return ret; + } + + /// + /// 取每个源标箱码的“操作状态=其它”的拆箱记录 + /// + /// 源标箱码列表 + /// + public async Task> GetListByFromPackingCode(List fromPackingCodeList) + { + List ret = new List(); + List lst = await _repository.GetListAsync( + itm => fromPackingCodeList.Contains(itm.FromPackingCode) + && itm.OprType == OprTypeEnum.SplitBox).ConfigureAwait(false); + + foreach (string fromCode in fromPackingCodeList) + { + var obj = lst.Where(itm => itm.FromPackingCode == fromCode && itm.OprType == OprTypeEnum.Other) + .OrderByDescending(itm => itm.CreationTime).FirstOrDefault(); + if (obj != null) + { + ret.Add(obj); + } + } + return ret; + } + /// /// 取顶级箱码 /// diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs index e546fe94f..7ea3e0afd 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContext.cs @@ -56,6 +56,9 @@ public class BasedataDbContext : AbpDbContext, IBasedataDbCon public DbSet PositionCodes { get; set; } public DbSet Equipments { get; set; } + + public DbSet SplitPackingRecs { get; set; } + public BasedataDbContext(DbContextOptions options) : base(options) { diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContextModelCreatingExtensions.cs index 5f1efe44d..dacc3c500 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataDbContextModelCreatingExtensions.cs @@ -67,7 +67,7 @@ public static class BasedataDbContextModelCreatingExtensions //设置decimal的默认小数位数 builder.ConfigurePrecisionOfDecimal(); builder.ConfigurePositionCode(options); - builder.ConfigureEquipmentArea(options); + builder.ConfigureSplitPackingRec(options); builder.ConfigureKitting(options); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataEntityFrameworkCoreModule.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataEntityFrameworkCoreModule.cs index 1fe9d93ff..ab9e3628b 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataEntityFrameworkCoreModule.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/BasedataEntityFrameworkCoreModule.cs @@ -69,7 +69,8 @@ public class BasedataEntityFrameworkCoreModule : AbpModule context.Services.AddTransient(); context.Services.AddTransient(); context.Services.AddTransient(); - context.Services.AddTransient(); +context.Services.AddTransient(); + context.Services.AddTransient(); context.Services.AddTransient(); ConfigureEntity(); } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs index f68df94f9..c259efd44 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/IBasedataDbContext.cs @@ -50,4 +50,8 @@ public interface IBasedataDbContext : IEfCoreDbContext public DbSet SupplierTimeWindows { get; } public DbSet ErpLocation { get; } public DbSet CustomerAddresses { get; } + + public DbSet SplitPackingRecs { get; set; } + + } diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.Designer.cs deleted file mode 100644 index 9b52fae10..000000000 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.Designer.cs +++ /dev/null @@ -1,3605 +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.Basedata.EntityFrameworkCore; - -#nullable disable - -namespace Win_in.Sfs.Basedata.Migrations -{ - [DbContext(typeof(BasedataDbContext))] - [Migration("20240223065132_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.Basedata.Domain.AQL", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("CeilingQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FloorQty") - .HasColumnType("decimal(18,6)"); - - b.Property("IsUsePercent") - .HasColumnType("bit"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SamplePercent") - .HasColumnType("decimal(18,6)"); - - b.Property("SampleQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "ItemCode", "FloorQty") - .IsUnique(); - - b.ToTable("Basedata_AQL", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsFunctional") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Area", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ComponentQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ComponentUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DistributionType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ERPOp") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Layer") - .ValueGeneratedOnAdd() - .HasMaxLength(64) - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("MFGOp") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PlannedSplitRule") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Product") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TruncType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Product", "Component") - .IsUnique(); - - b.ToTable("Basedata_Bom", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Module") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Module") - .IsUnique() - .HasFilter("[Module] IS NOT NULL"); - - b.ToTable("Basedata_Calendar", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Category", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsBasicCurrency") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Currency", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BasicCurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("EfficetiveTime") - .HasColumnType("datetime2"); - - b.Property("ExpireTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Rate") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("CurrencyId", "BasicCurrencyId") - .IsUnique(); - - b.ToTable("Basedata_CurrencyExchange", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contacts") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Currency") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Fax") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Phone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PostID") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ShortName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Customer", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contact") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Desc") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code", "CustomerCode") - .IsUnique(); - - b.ToTable("Basedata_CustomerAddress", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CustomerPackUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("CustomerCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_CustomerItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Dict", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterId"); - - b.ToTable("Basedata_DictItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Dock", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberFormat") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberPrefix") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberSeparator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberSerialLength") - .HasColumnType("int"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TransactionType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_DocumentSetting", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ErpLocation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConvertToTime") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Month") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Year") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_InterfaceCalendar", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AbcClass") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BasicUom") - .HasColumnType("nvarchar(max)"); - - b.Property("CanBuy") - .HasColumnType("bit"); - - b.Property("CanMake") - .HasColumnType("bit"); - - b.Property("CanOutsourcing") - .HasColumnType("bit"); - - b.Property("Category") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Color") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Configuration") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Desc1") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Desc2") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Eco") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Elevel") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsPhantom") - .HasColumnType("bit"); - - b.Property("IsRecycled") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("ManageType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Project") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Validity") - .HasColumnType("int"); - - b.Property("ValidityUnit") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ItemBasic", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CategoryCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("CategoryCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ItemCategory", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Desc1") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc2") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PictureBlobName") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Step") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ItemGuideBook", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BasicUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("PackCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "PackCode") - .IsUnique(); - - b.ToTable("Basedata_ItemPack", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "SupplierCode") - .IsUnique(); - - b.ToTable("Basedata_ItemQuality", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FeedLine") - .HasColumnType("decimal(18,6)"); - - b.Property("FeedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("FeedUM") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MaxStock") - .HasColumnType("decimal(18,6)"); - - b.Property("MinStock") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SafetyStock") - .HasColumnType("decimal(18,6)"); - - b.Property("StoreRelationType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreValue") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") - .IsUnique() - .HasFilter("[StoreValue] IS NOT NULL"); - - b.ToTable("Basedata_ItemSafetyStock", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AltUm") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AltUmQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsFixed") - .HasColumnType("bit"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MultiLoc") - .HasColumnType("int"); - - b.Property("PramaryUM") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StoreRelationType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreUM") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreValue") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UmQty") - .HasColumnType("decimal(18,6)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") - .IsUnique() - .HasFilter("[StoreValue] IS NOT NULL"); - - b.ToTable("Basedata_ItemStoreRelation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ColumnCode") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultInventoryStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EnableBreakStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableKeepZero") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixItem") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixLot") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixStatus") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableNegative") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOpportunityCount") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOverPick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnablePick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReceive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnFromCustomer") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnToSupplier") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableShip") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitBox") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitPallet") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableWholeStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("ErpLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationGroupCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PickOrder") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PickPriority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RowCode") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("ShelfCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkGroupCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Location", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultInventoryStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EnableBreakStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableKeepZero") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixItem") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixLot") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixStatus") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableNegative") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOpportunityCount") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOverPick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnablePick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReceive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnFromCustomer") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnToSupplier") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableShip") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitBox") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitPallet") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableWholeStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("GroupType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OverflowLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PickPriority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_LocationGroup", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLineId") - .HasColumnType("uniqueidentifier"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkStationId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Machine", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PartCode") - .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.HasKey("Id"); - - b.HasIndex("Code", "PartCode", "LocationCode") - .IsUnique() - .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); - - b.ToTable("Basedata_PositionCode", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkshopCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ProductionLine", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("ProdLineCode") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ProdLineCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ProductionLineItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Project", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MaterialPrice") - .HasColumnType("decimal(18,6)"); - - b.Property("ProductPrice") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode") - .IsUnique() - .HasFilter("[ItemCode] IS NOT NULL"); - - b.ToTable("Basedata_PurchasePriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code", "CustomerId") - .IsUnique(); - - b.ToTable("Basedata_SalePriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EndAtNextDay") - .HasColumnType("bit"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Shift", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code", "SupplierId") - .IsUnique(); - - b.ToTable("Basedata_StdCostPriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Bank") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contacts") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Currency") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Fax") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Phone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PostID") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ShortName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TaxRate") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Supplier", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("QtyPerPallet") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierSimpleName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_SupplierItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TimeSlot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Week") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "TimeSlot", "Week") - .IsUnique(); - - b.ToTable("Basedata_SupplierTimeWindow", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Members") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Team", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AutoAgreeRequest") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandleRequest") - .HasColumnType("bit"); - - b.Property("AutoSubmitRequest") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InInventoryStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("InLocationAreas") - .HasColumnType("nvarchar(max)"); - - b.Property("InLocationTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("OutInventoryStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OutLocationAreas") - .HasColumnType("nvarchar(max)"); - - b.Property("OutLocationTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TransSubType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TransType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("TransType", "TransSubType") - .IsUnique(); - - b.ToTable("Basedata_TransactionType", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Uom", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Warehouse", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkGroup", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkShop", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductionLineCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkStation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => - { - b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) - .WithMany("Items") - .HasForeignKey("MasterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => - { - b.Navigation("Items"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.cs deleted file mode 100644 index e9c641818..000000000 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240223065132_base.cs +++ /dev/null @@ -1,1603 +0,0 @@ -using System; -using Microsoft.EntityFrameworkCore.Migrations; - -#nullable disable - -namespace Win_in.Sfs.Basedata.Migrations -{ - public partial class @base : Migration - { - protected override void Up(MigrationBuilder migrationBuilder) - { - migrationBuilder.CreateTable( - name: "Basedata_AQL", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AbcClass = table.Column(type: "nvarchar(max)", nullable: true), - FloorQty = table.Column(type: "decimal(18,6)", nullable: false), - CeilingQty = table.Column(type: "decimal(18,6)", nullable: false), - SamplePercent = table.Column(type: "decimal(18,6)", nullable: false), - SampleQty = table.Column(type: "decimal(18,6)", nullable: false), - IsUsePercent = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_AQL", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Area", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AreaType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsFunctional = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Area", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Bom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Product = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Component = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ComponentUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ComponentQty = table.Column(type: "decimal(18,6)", nullable: false), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - ERPOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Layer = table.Column(type: "int", maxLength: 64, nullable: false, defaultValue: 1), - MFGOp = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DistributionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TruncType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PlannedSplitRule = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Bom", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Calendar", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Module = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Calendar", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Category", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Category", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Currency", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - IsBasicCurrency = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Currency", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_CurrencyExchange", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), - BasicCurrencyId = table.Column(type: "uniqueidentifier", nullable: false), - Rate = table.Column(type: "decimal(18,6)", nullable: false), - EfficetiveTime = table.Column(type: "datetime2", nullable: false), - ExpireTime = table.Column(type: "datetime2", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_CurrencyExchange", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Customer", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsActive = table.Column(type: "bit", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Customer", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_CustomerAddress", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Contact = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - LocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Desc = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_CustomerAddress", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_CustomerItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CustomerItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Version = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - CustomerPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - CustomerPackQty = table.Column(type: "decimal(18,6)", nullable: false), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_CustomerItem", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Dict", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Dict", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Dock", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - DefaultLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Dock", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_DocumentSetting", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - TransactionType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NumberPrefix = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NumberFormat = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - NumberSerialLength = table.Column(type: "int", nullable: false), - NumberSeparator = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_DocumentSetting", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ErpLocation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ErpLocation", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_InterfaceCalendar", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Year = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Month = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BeginTime = table.Column(type: "datetime2", nullable: false), - EndTime = table.Column(type: "datetime2", nullable: false), - ConvertToTime = table.Column(type: "datetime2", nullable: false), - Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(max)", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_InterfaceCalendar", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemBasic", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Desc1 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Desc2 = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CanMake = table.Column(type: "bit", nullable: false), - CanBuy = table.Column(type: "bit", nullable: false), - CanOutsourcing = table.Column(type: "bit", nullable: false), - IsRecycled = table.Column(type: "bit", nullable: false), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Category = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Group = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Color = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Configuration = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BasicUom = table.Column(type: "nvarchar(max)", nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - AbcClass = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Project = table.Column(type: "nvarchar(max)", nullable: true), - Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Eco = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Validity = table.Column(type: "int", nullable: false), - ValidityUnit = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ManageType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Elevel = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - IsPhantom = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemBasic", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemCategory", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - CategoryCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Value = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemCategory", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemGuideBook", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(max)", nullable: true), - Desc1 = table.Column(type: "nvarchar(max)", nullable: true), - Desc2 = table.Column(type: "nvarchar(max)", nullable: true), - Step = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - PictureBlobName = table.Column(type: "nvarchar(max)", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemGuideBook", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemPack", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - PackCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PackName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PackType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - BasicUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Qty = table.Column(type: "decimal(18,6)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemPack", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemQuality", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Status = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - InspectType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemQuality", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemSafetyStock", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - MaxStock = table.Column(type: "decimal(18,6)", nullable: false), - MinStock = table.Column(type: "decimal(18,6)", nullable: false), - SafetyStock = table.Column(type: "decimal(18,6)", nullable: false), - FeedLine = table.Column(type: "decimal(18,6)", nullable: false), - FeedQty = table.Column(type: "decimal(18,6)", nullable: false), - FeedUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemSafetyStock", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ItemStoreRelation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StoreRelationType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - StoreValue = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Enabled = table.Column(type: "bit", nullable: false), - StoreUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - UmQty = table.Column(type: "decimal(18,6)", nullable: false), - AltUm = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AltUmQty = table.Column(type: "decimal(18,6)", nullable: false), - PramaryUM = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - IsFixed = table.Column(type: "bit", nullable: false), - MultiLoc = table.Column(type: "int", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ItemStoreRelation", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Location", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ErpLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - LocationGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WorkGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ShelfCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RowCode = table.Column(type: "int", nullable: false, defaultValue: 1), - ColumnCode = table.Column(type: "int", nullable: false, defaultValue: 1), - DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), - PickOrder = table.Column(type: "int", nullable: false, defaultValue: 0), - EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), - EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Location", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_LocationGroup", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - AreaCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - GroupType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - DefaultInventoryStatus = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PickPriority = table.Column(type: "int", nullable: false, defaultValue: 0), - OverflowLocationGroup = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - EnableMixItem = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableMixLot = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableMixStatus = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableNegative = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableKeepZero = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableOpportunityCount = table.Column(type: "bit", nullable: false, defaultValue: true), - EnablePick = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableOverPick = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableWholeStore = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableBreakStore = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableShip = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReceive = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReturnToSupplier = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableReturnFromCustomer = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableSplitBox = table.Column(type: "bit", nullable: false, defaultValue: true), - EnableSplitPallet = table.Column(type: "bit", nullable: false, defaultValue: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_LocationGroup", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Machine", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProdLineId = table.Column(type: "uniqueidentifier", nullable: false), - WorkStationId = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Machine", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_PositionCode", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - PartCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - StdPackQty = table.Column(type: "decimal(18,6)", nullable: false), - 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) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_PositionCode", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ProductionLine", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - WorkshopCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - RawLocationGroupCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ProductionLine", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_ProductionLineItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ProdLineCode = table.Column(type: "nvarchar(450)", nullable: false), - ItemCode = table.Column(type: "nvarchar(450)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_ProductionLineItem", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Project", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - CustomerCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Project", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_PurchasePriceSheet", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", nullable: false), - MaterialPrice = table.Column(type: "decimal(18,6)", nullable: false), - ProductPrice = table.Column(type: "decimal(18,6)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_PurchasePriceSheet", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_SalePriceSheet", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - CustomerId = table.Column(type: "uniqueidentifier", maxLength: 64, nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_SalePriceSheet", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Shift", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - BeginTime = table.Column(type: "datetime2", nullable: true), - EndTime = table.Column(type: "datetime2", nullable: true), - EndAtNextDay = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Shift", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_StdCostPriceSheet", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierId = table.Column(type: "uniqueidentifier", nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - CurrencyId = table.Column(type: "uniqueidentifier", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_StdCostPriceSheet", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Supplier", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ShortName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Address = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Country = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - City = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Phone = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Fax = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - PostID = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Contacts = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Bank = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Currency = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - TaxRate = table.Column(type: "decimal(18,6)", nullable: false), - IsActive = table.Column(type: "bit", nullable: false, defaultValue: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Supplier", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_SupplierItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierSimpleName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ItemName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierItemCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Version = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierPackUom = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - SupplierPackQty = table.Column(type: "decimal(18,6)", nullable: false), - QtyPerPallet = table.Column(type: "decimal(18,6)", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_SupplierItem", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_SupplierTimeWindow", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - SupplierCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - SupplierName = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TimeSlot = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Week = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_SupplierTimeWindow", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Team", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Members = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Team", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_TransactionType", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - TransType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - TransSubType = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: false), - InLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OutLocationTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), - OutLocationAreas = table.Column(type: "nvarchar(max)", nullable: true), - ItemStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ItemTypes = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - InInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - OutInventoryStatuses = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - AutoSubmitRequest = table.Column(type: "bit", nullable: false), - AutoAgreeRequest = table.Column(type: "bit", nullable: false), - AutoHandleRequest = table.Column(type: "bit", nullable: false), - AutoCompleteJob = table.Column(type: "bit", nullable: false), - DirectCreateNote = table.Column(type: "bit", nullable: false), - Enabled = table.Column(type: "bit", nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_TransactionType", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Uom", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Uom", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_Warehouse", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_Warehouse", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_WorkGroup", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - WarehouseCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_WorkGroup", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_WorkShop", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_WorkShop", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_WorkStation", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - ProductionLineCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - RawLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ProductLocationCode = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Type = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true), - ConcurrencyStamp = table.Column(type: "nvarchar(40)", maxLength: 40, nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_WorkStation", x => x.Id); - }); - - migrationBuilder.CreateTable( - name: "Basedata_DictItem", - columns: table => new - { - Id = table.Column(type: "uniqueidentifier", nullable: false), - MasterId = table.Column(type: "uniqueidentifier", nullable: false), - Code = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: false), - Name = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Value = table.Column(type: "nvarchar(64)", maxLength: 64, nullable: true), - Description = table.Column(type: "nvarchar(1024)", maxLength: 1024, nullable: true), - Enabled = table.Column(type: "bit", nullable: false), - Remark = table.Column(type: "nvarchar(3072)", maxLength: 3072, nullable: true), - TenantId = table.Column(type: "uniqueidentifier", nullable: true), - CreationTime = table.Column(type: "datetime2", nullable: false), - CreatorId = table.Column(type: "uniqueidentifier", nullable: true), - LastModificationTime = table.Column(type: "datetime2", nullable: true), - LastModifierId = table.Column(type: "uniqueidentifier", nullable: true) - }, - constraints: table => - { - table.PrimaryKey("PK_Basedata_DictItem", x => x.Id); - table.ForeignKey( - name: "FK_Basedata_DictItem_Basedata_Dict_MasterId", - column: x => x.MasterId, - principalTable: "Basedata_Dict", - principalColumn: "Id", - onDelete: ReferentialAction.Cascade); - }); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_AQL_SupplierCode_ItemCode_FloorQty", - table: "Basedata_AQL", - columns: new[] { "SupplierCode", "ItemCode", "FloorQty" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Area_Code", - table: "Basedata_Area", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Bom_Product_Component", - table: "Basedata_Bom", - columns: new[] { "Product", "Component" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Calendar_Module", - table: "Basedata_Calendar", - column: "Module", - unique: true, - filter: "[Module] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Category_Code", - table: "Basedata_Category", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Currency_Code", - table: "Basedata_Currency", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_CurrencyExchange_CurrencyId_BasicCurrencyId", - table: "Basedata_CurrencyExchange", - columns: new[] { "CurrencyId", "BasicCurrencyId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Customer_Code", - table: "Basedata_Customer", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_CustomerAddress_Code_CustomerCode", - table: "Basedata_CustomerAddress", - columns: new[] { "Code", "CustomerCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_CustomerItem_CustomerCode_ItemCode", - table: "Basedata_CustomerItem", - columns: new[] { "CustomerCode", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Dict_Code", - table: "Basedata_Dict", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_DictItem_MasterId", - table: "Basedata_DictItem", - column: "MasterId"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Dock_Code", - table: "Basedata_Dock", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_DocumentSetting_Code", - table: "Basedata_DocumentSetting", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ErpLocation_Code", - table: "Basedata_ErpLocation", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_InterfaceCalendar_Code", - table: "Basedata_InterfaceCalendar", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemBasic_Code", - table: "Basedata_ItemBasic", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemCategory_CategoryCode_ItemCode", - table: "Basedata_ItemCategory", - columns: new[] { "CategoryCode", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemGuideBook_ItemCode", - table: "Basedata_ItemGuideBook", - column: "ItemCode", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemPack_ItemCode_PackCode", - table: "Basedata_ItemPack", - columns: new[] { "ItemCode", "PackCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemQuality_ItemCode_SupplierCode", - table: "Basedata_ItemQuality", - columns: new[] { "ItemCode", "SupplierCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemSafetyStock_ItemCode_WarehouseCode_StoreRelationType_StoreValue", - table: "Basedata_ItemSafetyStock", - columns: new[] { "ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue" }, - unique: true, - filter: "[StoreValue] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ItemStoreRelation_ItemCode_StoreRelationType_StoreValue", - table: "Basedata_ItemStoreRelation", - columns: new[] { "ItemCode", "StoreRelationType", "StoreValue" }, - unique: true, - filter: "[StoreValue] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Location_Code", - table: "Basedata_Location", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_LocationGroup_Code", - table: "Basedata_LocationGroup", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Machine_Code", - table: "Basedata_Machine", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_PositionCode_Code_PartCode_LocationCode", - table: "Basedata_PositionCode", - columns: new[] { "Code", "PartCode", "LocationCode" }, - unique: true, - filter: "[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ProductionLine_Code", - table: "Basedata_ProductionLine", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_ProductionLineItem_ProdLineCode_ItemCode", - table: "Basedata_ProductionLineItem", - columns: new[] { "ProdLineCode", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Project_Code", - table: "Basedata_Project", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_PurchasePriceSheet_ItemCode", - table: "Basedata_PurchasePriceSheet", - column: "ItemCode", - unique: true, - filter: "[ItemCode] IS NOT NULL"); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_SalePriceSheet_Code_CustomerId", - table: "Basedata_SalePriceSheet", - columns: new[] { "Code", "CustomerId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Shift_Code", - table: "Basedata_Shift", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_StdCostPriceSheet_Code_SupplierId", - table: "Basedata_StdCostPriceSheet", - columns: new[] { "Code", "SupplierId" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Supplier_Code", - table: "Basedata_Supplier", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_SupplierItem_SupplierCode_ItemCode", - table: "Basedata_SupplierItem", - columns: new[] { "SupplierCode", "ItemCode" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_SupplierTimeWindow_SupplierCode_TimeSlot_Week", - table: "Basedata_SupplierTimeWindow", - columns: new[] { "SupplierCode", "TimeSlot", "Week" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Team_Code", - table: "Basedata_Team", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_TransactionType_TransType_TransSubType", - table: "Basedata_TransactionType", - columns: new[] { "TransType", "TransSubType" }, - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Uom_Code", - table: "Basedata_Uom", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_Warehouse_Code", - table: "Basedata_Warehouse", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_WorkGroup_Code", - table: "Basedata_WorkGroup", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_WorkShop_Code", - table: "Basedata_WorkShop", - column: "Code", - unique: true); - - migrationBuilder.CreateIndex( - name: "IX_Basedata_WorkStation_Code", - table: "Basedata_WorkStation", - column: "Code", - unique: true); - } - - protected override void Down(MigrationBuilder migrationBuilder) - { - migrationBuilder.DropTable( - name: "Basedata_AQL"); - - migrationBuilder.DropTable( - name: "Basedata_Area"); - - migrationBuilder.DropTable( - name: "Basedata_Bom"); - - migrationBuilder.DropTable( - name: "Basedata_Calendar"); - - migrationBuilder.DropTable( - name: "Basedata_Category"); - - migrationBuilder.DropTable( - name: "Basedata_Currency"); - - migrationBuilder.DropTable( - name: "Basedata_CurrencyExchange"); - - migrationBuilder.DropTable( - name: "Basedata_Customer"); - - migrationBuilder.DropTable( - name: "Basedata_CustomerAddress"); - - migrationBuilder.DropTable( - name: "Basedata_CustomerItem"); - - migrationBuilder.DropTable( - name: "Basedata_DictItem"); - - migrationBuilder.DropTable( - name: "Basedata_Dock"); - - migrationBuilder.DropTable( - name: "Basedata_DocumentSetting"); - - migrationBuilder.DropTable( - name: "Basedata_ErpLocation"); - - migrationBuilder.DropTable( - name: "Basedata_InterfaceCalendar"); - - migrationBuilder.DropTable( - name: "Basedata_ItemBasic"); - - migrationBuilder.DropTable( - name: "Basedata_ItemCategory"); - - migrationBuilder.DropTable( - name: "Basedata_ItemGuideBook"); - - migrationBuilder.DropTable( - name: "Basedata_ItemPack"); - - migrationBuilder.DropTable( - name: "Basedata_ItemQuality"); - - migrationBuilder.DropTable( - name: "Basedata_ItemSafetyStock"); - - migrationBuilder.DropTable( - name: "Basedata_ItemStoreRelation"); - - migrationBuilder.DropTable( - name: "Basedata_Location"); - - migrationBuilder.DropTable( - name: "Basedata_LocationGroup"); - - migrationBuilder.DropTable( - name: "Basedata_Machine"); - - migrationBuilder.DropTable( - name: "Basedata_PositionCode"); - - migrationBuilder.DropTable( - name: "Basedata_ProductionLine"); - - migrationBuilder.DropTable( - name: "Basedata_ProductionLineItem"); - - migrationBuilder.DropTable( - name: "Basedata_Project"); - - migrationBuilder.DropTable( - name: "Basedata_PurchasePriceSheet"); - - migrationBuilder.DropTable( - name: "Basedata_SalePriceSheet"); - - migrationBuilder.DropTable( - name: "Basedata_Shift"); - - migrationBuilder.DropTable( - name: "Basedata_StdCostPriceSheet"); - - migrationBuilder.DropTable( - name: "Basedata_Supplier"); - - migrationBuilder.DropTable( - name: "Basedata_SupplierItem"); - - migrationBuilder.DropTable( - name: "Basedata_SupplierTimeWindow"); - - migrationBuilder.DropTable( - name: "Basedata_Team"); - - migrationBuilder.DropTable( - name: "Basedata_TransactionType"); - - migrationBuilder.DropTable( - name: "Basedata_Uom"); - - migrationBuilder.DropTable( - name: "Basedata_Warehouse"); - - migrationBuilder.DropTable( - name: "Basedata_WorkGroup"); - - migrationBuilder.DropTable( - name: "Basedata_WorkShop"); - - migrationBuilder.DropTable( - name: "Basedata_WorkStation"); - - migrationBuilder.DropTable( - name: "Basedata_Dict"); - } - } -} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs deleted file mode 100644 index e4f0ce499..000000000 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/BasedataDbContextModelSnapshot.cs +++ /dev/null @@ -1,3603 +0,0 @@ -// -using System; -using Microsoft.EntityFrameworkCore; -using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; -using Microsoft.EntityFrameworkCore.Storage.ValueConversion; -using Volo.Abp.EntityFrameworkCore; -using Win_in.Sfs.Basedata.EntityFrameworkCore; - -#nullable disable - -namespace Win_in.Sfs.Basedata.Migrations -{ - [DbContext(typeof(BasedataDbContext))] - partial class BasedataDbContextModelSnapshot : ModelSnapshot - { - protected override void BuildModel(ModelBuilder modelBuilder) - { -#pragma warning disable 612, 618 - modelBuilder - .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer) - .HasAnnotation("ProductVersion", "6.0.13") - .HasAnnotation("Relational:MaxIdentifierLength", 128); - - SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.AQL", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AbcClass") - .HasColumnType("nvarchar(max)"); - - b.Property("CeilingQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FloorQty") - .HasColumnType("decimal(18,6)"); - - b.Property("IsUsePercent") - .HasColumnType("bit"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SamplePercent") - .HasColumnType("decimal(18,6)"); - - b.Property("SampleQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "ItemCode", "FloorQty") - .IsUnique(); - - b.ToTable("Basedata_AQL", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsFunctional") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Area", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Component") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ComponentQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ComponentUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DistributionType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ERPOp") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Layer") - .ValueGeneratedOnAdd() - .HasMaxLength(64) - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("MFGOp") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PlannedSplitRule") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Product") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TruncType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Product", "Component") - .IsUnique(); - - b.ToTable("Basedata_Bom", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Module") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Module") - .IsUnique() - .HasFilter("[Module] IS NOT NULL"); - - b.ToTable("Basedata_Calendar", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Category", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsBasicCurrency") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Currency", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BasicCurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("EfficetiveTime") - .HasColumnType("datetime2"); - - b.Property("ExpireTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Rate") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("CurrencyId", "BasicCurrencyId") - .IsUnique(); - - b.ToTable("Basedata_CurrencyExchange", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contacts") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Currency") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Fax") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsActive") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Phone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PostID") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ShortName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Customer", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contact") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Desc") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code", "CustomerCode") - .IsUnique(); - - b.ToTable("Basedata_CustomerAddress", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CustomerPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("CustomerPackUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("CustomerCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_CustomerItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Dict", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MasterId") - .HasColumnType("uniqueidentifier"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("MasterId"); - - b.ToTable("Basedata_DictItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Dock", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => - { - b.Property("Id") - .ValueGeneratedOnAdd() - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberFormat") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberPrefix") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberSeparator") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("NumberSerialLength") - .HasColumnType("int"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TransactionType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_DocumentSetting", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ErpLocation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("ConvertToTime") - .HasColumnType("datetime2"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Month") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasColumnType("nvarchar(max)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Year") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_InterfaceCalendar", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AbcClass") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("BasicUom") - .HasColumnType("nvarchar(max)"); - - b.Property("CanBuy") - .HasColumnType("bit"); - - b.Property("CanMake") - .HasColumnType("bit"); - - b.Property("CanOutsourcing") - .HasColumnType("bit"); - - b.Property("Category") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Color") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Configuration") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Desc1") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Desc2") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Eco") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Elevel") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Group") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsPhantom") - .HasColumnType("bit"); - - b.Property("IsRecycled") - .HasColumnType("bit"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("ManageType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Project") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StdPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Validity") - .HasColumnType("int"); - - b.Property("ValidityUnit") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ItemBasic", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("CategoryCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Value") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.HasKey("Id"); - - b.HasIndex("CategoryCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ItemCategory", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Desc1") - .HasColumnType("nvarchar(max)"); - - b.Property("Desc2") - .HasColumnType("nvarchar(max)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasColumnType("nvarchar(max)"); - - b.Property("PictureBlobName") - .HasColumnType("nvarchar(max)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Step") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ItemGuideBook", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BasicUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("PackCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PackType") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Qty") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "PackCode") - .IsUnique(); - - b.ToTable("Basedata_ItemPack", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InspectType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("Status") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "SupplierCode") - .IsUnique(); - - b.ToTable("Basedata_ItemQuality", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("FeedLine") - .HasColumnType("decimal(18,6)"); - - b.Property("FeedQty") - .HasColumnType("decimal(18,6)"); - - b.Property("FeedUM") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MaxStock") - .HasColumnType("decimal(18,6)"); - - b.Property("MinStock") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SafetyStock") - .HasColumnType("decimal(18,6)"); - - b.Property("StoreRelationType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreValue") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "WarehouseCode", "StoreRelationType", "StoreValue") - .IsUnique() - .HasFilter("[StoreValue] IS NOT NULL"); - - b.ToTable("Basedata_ItemSafetyStock", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AltUm") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("AltUmQty") - .HasColumnType("decimal(18,6)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("IsFixed") - .HasColumnType("bit"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MultiLoc") - .HasColumnType("int"); - - b.Property("PramaryUM") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("StoreRelationType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreUM") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("StoreValue") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("UmQty") - .HasColumnType("decimal(18,6)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode", "StoreRelationType", "StoreValue") - .IsUnique() - .HasFilter("[StoreValue] IS NOT NULL"); - - b.ToTable("Basedata_ItemStoreRelation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ColumnCode") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultInventoryStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EnableBreakStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableKeepZero") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixItem") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixLot") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixStatus") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableNegative") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOpportunityCount") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOverPick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnablePick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReceive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnFromCustomer") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnToSupplier") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableShip") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitBox") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitPallet") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableWholeStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("ErpLocationCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationGroupCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PickOrder") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("PickPriority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("RowCode") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(1); - - b.Property("ShelfCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkGroupCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Location", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AreaCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("DefaultInventoryStatus") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EnableBreakStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableKeepZero") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixItem") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixLot") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableMixStatus") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableNegative") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOpportunityCount") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableOverPick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnablePick") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReceive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnFromCustomer") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableReturnToSupplier") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableShip") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitBox") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableSplitPallet") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("EnableWholeStore") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("GroupType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OverflowLocationGroup") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PickPriority") - .ValueGeneratedOnAdd() - .HasColumnType("int") - .HasDefaultValue(0); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_LocationGroup", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProdLineId") - .HasColumnType("uniqueidentifier"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkStationId") - .HasColumnType("uniqueidentifier"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Machine", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PositionCode", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("LocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PartCode") - .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.HasKey("Id"); - - b.HasIndex("Code", "PartCode", "LocationCode") - .IsUnique() - .HasFilter("[PartCode] IS NOT NULL AND [LocationCode] IS NOT NULL"); - - b.ToTable("Basedata_PositionCode", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationGroupCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("WorkshopCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_ProductionLine", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("ProdLineCode") - .IsRequired() - .HasColumnType("nvarchar(450)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ProdLineCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_ProductionLineItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CustomerCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Project", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("MaterialPrice") - .HasColumnType("decimal(18,6)"); - - b.Property("ProductPrice") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("ItemCode") - .IsUnique() - .HasFilter("[ItemCode] IS NOT NULL"); - - b.ToTable("Basedata_PurchasePriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("CustomerId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code", "CustomerId") - .IsUnique(); - - b.ToTable("Basedata_SalePriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("BeginTime") - .HasColumnType("datetime2"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("EndAtNextDay") - .HasColumnType("bit"); - - b.Property("EndTime") - .HasColumnType("datetime2"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Shift", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("CurrencyId") - .HasMaxLength(64) - .HasColumnType("uniqueidentifier"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierId") - .HasColumnType("uniqueidentifier"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code", "SupplierId") - .IsUnique(); - - b.ToTable("Basedata_StdCostPriceSheet", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Address") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("Bank") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("City") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("Contacts") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Country") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Currency") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("Fax") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("IsActive") - .ValueGeneratedOnAdd() - .HasColumnType("bit") - .HasDefaultValue(true); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Phone") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("PostID") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("ShortName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TaxRate") - .HasColumnType("decimal(18,6)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Supplier", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("ItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("QtyPerPallet") - .HasColumnType("decimal(18,6)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierItemCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierPackQty") - .HasColumnType("decimal(18,6)"); - - b.Property("SupplierPackUom") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierSimpleName") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Version") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "ItemCode") - .IsUnique(); - - b.ToTable("Basedata_SupplierItem", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("SupplierCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("SupplierName") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TimeSlot") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Week") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("SupplierCode", "TimeSlot", "Week") - .IsUnique(); - - b.ToTable("Basedata_SupplierTimeWindow", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Members") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Team", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("AutoAgreeRequest") - .HasColumnType("bit"); - - b.Property("AutoCompleteJob") - .HasColumnType("bit"); - - b.Property("AutoHandleRequest") - .HasColumnType("bit"); - - b.Property("AutoSubmitRequest") - .HasColumnType("bit"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .IsRequired() - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("DirectCreateNote") - .HasColumnType("bit"); - - b.Property("Enabled") - .HasColumnType("bit"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("InInventoryStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("InLocationAreas") - .HasColumnType("nvarchar(max)"); - - b.Property("InLocationTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ItemTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("OutInventoryStatuses") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("OutLocationAreas") - .HasColumnType("nvarchar(max)"); - - b.Property("OutLocationTypes") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("TransSubType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("TransType") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("TransType", "TransSubType") - .IsUnique(); - - b.ToTable("Basedata_TransactionType", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Uom", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_Warehouse", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("WarehouseCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkGroup", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkShop", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => - { - b.Property("Id") - .HasColumnType("uniqueidentifier"); - - b.Property("Code") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ConcurrencyStamp") - .IsConcurrencyToken() - .HasMaxLength(40) - .HasColumnType("nvarchar(40)") - .HasColumnName("ConcurrencyStamp"); - - b.Property("CreationTime") - .HasColumnType("datetime2") - .HasColumnName("CreationTime"); - - b.Property("CreatorId") - .HasColumnType("uniqueidentifier") - .HasColumnName("CreatorId"); - - b.Property("Description") - .HasMaxLength(1024) - .HasColumnType("nvarchar(1024)"); - - b.Property("ExtraProperties") - .HasColumnType("nvarchar(max)") - .HasColumnName("ExtraProperties"); - - b.Property("LastModificationTime") - .HasColumnType("datetime2") - .HasColumnName("LastModificationTime"); - - b.Property("LastModifierId") - .HasColumnType("uniqueidentifier") - .HasColumnName("LastModifierId"); - - b.Property("Name") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("ProductionLineCode") - .IsRequired() - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("RawLocationCode") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.Property("Remark") - .HasMaxLength(3072) - .HasColumnType("nvarchar(3072)") - .HasColumnName("Remark"); - - b.Property("TenantId") - .HasColumnType("uniqueidentifier") - .HasColumnName("TenantId"); - - b.Property("Type") - .HasMaxLength(64) - .HasColumnType("nvarchar(64)"); - - b.HasKey("Id"); - - b.HasIndex("Code") - .IsUnique(); - - b.ToTable("Basedata_WorkStation", (string)null); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => - { - b.HasOne("Win_in.Sfs.Basedata.Domain.Dict", null) - .WithMany("Items") - .HasForeignKey("MasterId") - .OnDelete(DeleteBehavior.Cascade) - .IsRequired(); - }); - - modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => - { - b.Navigation("Items"); - }); -#pragma warning restore 612, 618 - } - } -} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs index ed2932a3f..b679f5f79 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs @@ -24,6 +24,9 @@ public static class PositionCodeDbContextModelCreatingExtensions b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength); b.Property(q => q.PartCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PartName).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.LocationName).HasMaxLength(SfsPropertyConst.NameLength); + b.Property(q => q.Type).HasMaxLength(SfsPropertyConst.NameLength).HasConversion(); //Relations //None diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs similarity index 92% rename from be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs rename to be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs index 667449e83..db760c765 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecDbContextModelCreatingExtensions.cs @@ -1,15 +1,13 @@ using Microsoft.EntityFrameworkCore; using Volo.Abp.EntityFrameworkCore.Modeling; -using Win_in.Sfs.Label.Domain; +using Win_in.Sfs.Basedata.Domain; 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; +namespace Win_in.Sfs.Basedata.EntityFrameworkCore; public static class SplitPackingRecDbContextModelCreatingExtensions { - public static void ConfigureSplitPackingRec(this ModelBuilder builder, StoreModelBuilderConfigurationOptions options) + public static void ConfigureSplitPackingRec(this ModelBuilder builder, BasedataModelBuilderConfigurationOptions options) { builder.Entity(b => { diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs new file mode 100644 index 000000000..a3929a478 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs @@ -0,0 +1,11 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Basedata.Domain; + +namespace Win_in.Sfs.Basedata.EntityFrameworkCore; + +public class SplitPackingRecEfCoreRepository : SfsBaseDataEfCoreRepositoryBase, ISplitPackingRecRepository +{ + public SplitPackingRecEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Win_in.Sfs.Basedata.EntityFrameworkCore.csproj b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Win_in.Sfs.Basedata.EntityFrameworkCore.csproj index 2ee6ae91f..7fecf30fe 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Win_in.Sfs.Basedata.EntityFrameworkCore.csproj +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Win_in.Sfs.Basedata.EntityFrameworkCore.csproj @@ -30,8 +30,4 @@ - - - - diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/IInventoryLabelAppService.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/IInventoryLabelAppService.cs index 406c140fa..069f4dc1f 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/IInventoryLabelAppService.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application.Contracts/InventoryLabels/IInventoryLabelAppService.cs @@ -20,4 +20,12 @@ public interface IInventoryLabelAppService /// /// Task> CreateManyByNoCodeAsync(List inputs); + + /// + /// Code需要自己生成 传入 否则无法赋值 完整条码 + /// + /// + /// + Task> CreateManyByNoCode_NewAsync(List inputs); + } diff --git a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs index 815acff1a..aadf19f0e 100644 --- a/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs +++ b/be/Modules/Label/src/Win_in.Sfs.Label.Application/InventoryLabels/InventoryLabelAppService.cs @@ -12,6 +12,7 @@ using Volo.Abp.Domain.Repositories; using Volo.Abp.ObjectMapping; using Volo.Abp.Uow; using Win_in.Sfs.Basedata.Application.Contracts; +using Win_in.Sfs.Basedata.Domain.Shared; using Win_in.Sfs.Label.Application.Contracts; using Win_in.Sfs.Label.Domain; using Win_in.Sfs.Label.Domain.Shared; @@ -37,6 +38,8 @@ public class InventoryLabelAppService private readonly ISupplierAppService _supplierAppService; private readonly ISupplierItemAppService _supplierItemAppService; private readonly IItemBasicAppService _itemBasicAppService; + private readonly ISplitPackingRecAppService _splitPackingRecAppService; + public InventoryLabelAppService( IInventoryLabelRepository repository, ILabelDefinitionManager labelDefinitionManager @@ -44,6 +47,7 @@ public class InventoryLabelAppService , IItemPackAppService itemPackAppService , ISupplierItemAppService supplierItemAppService , IItemBasicAppService itemBasicAppService + , ISplitPackingRecAppService splitPackingRecAppService ) : base(repository) { _repository = repository; @@ -52,6 +56,7 @@ public class InventoryLabelAppService _itemPackAppService = itemPackAppService; _supplierItemAppService = supplierItemAppService; _itemBasicAppService = itemBasicAppService; + _splitPackingRecAppService = splitPackingRecAppService; } [HttpPost("")] @@ -133,6 +138,58 @@ public class InventoryLabelAppService return ObjectMapper.Map, List>(entitys); } + /// + /// Code需要自己生成 传入 否则无法赋值 完整条码 + /// + /// + /// + [HttpPost("create-many-no-code-new")] + [UnitOfWork] + public virtual async Task> CreateManyByNoCode_NewAsync(List inputs) + { + #region 插入拆箱记录表 + foreach (var inputObj in inputs) + { + List recLst = new List(); + SplitPackingRecEditInput packRec = new SplitPackingRecEditInput(); + packRec.OprType = OprTypeEnum.Other; + packRec.FromPackingCode = inputObj.Code; + //packRec.FromTopPackingCode = inventoryLabelObj.Code; + packRec.FromStdPackQty = inputObj.StdPackQty; + packRec.FromUom = inputObj.Uom; + packRec.FromQty = inputObj.Qty; + packRec.ToPackingCode = inputObj.Code; + //packRec.ToTopPackingCode = inventoryLabelObj.Code; + packRec.ToStdPackQty = inputObj.StdPackQty; + packRec.ToUom = inputObj.Uom; + packRec.ToQty = inputObj.Qty; + packRec.ItemCode = inputObj.ItemCode; + packRec.ItemName = inputObj.ItemName; + packRec.ItemDesc1 = inputObj.ItemDesc1; + packRec.ItemDesc2 = inputObj.ItemDesc2; + packRec.FromLot = inputObj.Lot; + packRec.ToLot = inputObj.Lot; + packRec.PurchaseInfo_PoNumber = inputObj.PoNumber; // 采购订单 + packRec.PurchaseInfo_AsnNumber = inputObj.AsnNumber; //供应商发货单 + packRec.ArrivalNoticNumber = null; //到货通知 + packRec.TaskOrderNumber = null; //任务单 + packRec.ReceiptRecNumber = null; //收货记录单 + packRec.PutOnShelfNumber = null; //上架单 + recLst.Add(packRec); + bool bo = await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false); + if (bo == false) + { + throw new UserFriendlyException("调用插入拆箱记录表方法时返回假!"); + } + } + #endregion + + var entitys = ObjectMapper.Map, List>(inputs); + await _repository.InsertManyAsync(entitys).ConfigureAwait(false); + return ObjectMapper.Map, List>(entitys); + } + + [HttpPost("generate-and-create")] [UnitOfWork] public virtual async Task GenerateAndCreateAsync(InventoryLabelWithoutCodeCreateInput input) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ItemTransformNotes/Inputs/ItemTransformNoteEditInput.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ItemTransformNotes/Inputs/ItemTransformNoteEditInput.cs index f510825a1..89b78e113 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ItemTransformNotes/Inputs/ItemTransformNoteEditInput.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/ItemTransformNotes/Inputs/ItemTransformNoteEditInput.cs @@ -33,5 +33,10 @@ public class ItemTransformNoteEditInput : SfsStoreCreateOrUpdateInputBase /// [Display(Name = "明细列表")] public List Details { get; set; } = new List(); + /// + /// 混拌料入库数据 + /// + + public List RecDetails { get; set; } = new List(); #endregion } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/DTOs/PurchaseReceiptNoteDetailDTO.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/DTOs/PurchaseReceiptNoteDetailDTO.cs index f99cd6c5b..a64246980 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/DTOs/PurchaseReceiptNoteDetailDTO.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/DTOs/PurchaseReceiptNoteDetailDTO.cs @@ -57,3 +57,16 @@ public class PurchaseReceiptNoteDetailDTO : SfsStoreRecommendToDetailWithLotPack public decimal SupplierPackQty { get; set; } } + +public class PurchaseReceiptNoteDetail_ExtDTO : PurchaseReceiptNoteDetailDTO +{ + /// + /// 拆箱的源箱码 + /// + public string FromPackingCode { get; set; } + + /// + /// 拆箱的目标箱码 + /// + public string ToPackingCode { get; set; } +} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/IPurchaseReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/IPurchaseReceiptNoteAppService.cs index bc3f32af9..55bc79939 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/IPurchaseReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/PurchaseReceiptNotes/IPurchaseReceiptNoteAppService.cs @@ -32,7 +32,7 @@ public interface IPurchaseReceiptNoteAppService : /// 获取详情 不合格 /// /// - Task> GetDetailListByNoOkAsync(Guid id); + Task> GetDetailListByNoOkAsync(Guid id); /// /// 获取详情 未收货 diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/RecycledMaterialReceiptNotes/IRecycledMaterialReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/RecycledMaterialReceiptNotes/IRecycledMaterialReceiptNoteAppService.cs index 3b42f839c..d62a3746e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/RecycledMaterialReceiptNotes/IRecycledMaterialReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/Notes/RecycledMaterialReceiptNotes/IRecycledMaterialReceiptNoteAppService.cs @@ -6,4 +6,5 @@ public interface IRecycledMaterialReceiptNoteAppService : ISfsStoreMasterReadOnlyAppServiceBase { Task CreateAsync(RecycledMaterialReceiptNoteEditInput input); + Task NewCreateAsync(RecycledMaterialReceiptNoteEditInput input); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs deleted file mode 100644 index df7886391..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application.Contracts/SplitPackings/ISplitPackingRecAppService.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Shared.Application.Contracts; -using Win_in.Sfs.Wms.Store.Application.Contracts; - -namespace Win_in.Sfs.Wms.Store.SplitPackings; - -public interface ISplitPackingRecAppService - : ISfsStoreAppServiceBase -{ - Task BatchInsertAsync(List inputs); - -} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAppService.cs index 0d361afa1..034634fd8 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAppService.cs @@ -20,13 +20,16 @@ public class ItemTransformNoteAppService : { private readonly IItemTransformNoteManager _ItemTransformNoteManager; private readonly ILocationCapacityAppService _locationCapacityAppService; + private readonly IRecycledMaterialReceiptNoteAppService _recycledMaterialReceiptNoteAppService; public ItemTransformNoteAppService(IItemTransformNoteRepository repository, IItemTransformNoteManager ItemTransformNoteManager, - ILocationCapacityAppService locationCapacityAppService) : base(repository) + ILocationCapacityAppService locationCapacityAppService, + IRecycledMaterialReceiptNoteAppService recycledMaterialReceiptNoteAppService) : base(repository) { _ItemTransformNoteManager = ItemTransformNoteManager; _locationCapacityAppService = locationCapacityAppService; + _recycledMaterialReceiptNoteAppService = recycledMaterialReceiptNoteAppService; } [HttpPost("")] @@ -41,4 +44,18 @@ public class ItemTransformNoteAppService : return dto; } + + [HttpPost("new-create")] + //[Authorize(ItemTransformNotePermissions.Create)] + public async Task NewCreateAsync(ItemTransformNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + await _ItemTransformNoteManager.CreateAsync(entity).ConfigureAwait(false); + var recInput = ObjectMapper.Map(input); + await _recycledMaterialReceiptNoteAppService.NewCreateAsync(recInput).ConfigureAwait(false); + var dto = ObjectMapper.Map(entity); + + return dto; + } + } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAutoMapperProfile.cs index 341d1b2ac..dce86437e 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/ItemTransformNotes/ItemTransformNoteAutoMapperProfile.cs @@ -30,7 +30,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile .Ignore(x => x.Number) .Ignore(x => x.Id) .Ignore(x=>x.ExtraProperties) - .Ignore(x => x.Remark) - ; + .Ignore(x => x.Remark); + CreateMap() + .ForMember(x => x.Details, y => y.MapFrom(d => d.RecDetails)) + .Ignore(x => x.TenantId) + .Ignore(x => x.Number) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.Remark); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs index ea0259e7a..f218f9a99 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAppService.cs @@ -5,6 +5,7 @@ using System.Threading.Tasks; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Volo.Abp.ObjectMapping; +using Win_in.Sfs.Basedata.Application.Contracts; using Win_in.Sfs.Shared.Domain.Shared; using Win_in.Sfs.Wms.Store.Application.Contracts; using Win_in.Sfs.Wms.Store.Domain; @@ -21,13 +22,16 @@ public class PurchaseReceiptNoteAppService : IPurchaseReceiptNoteAppService { private readonly IPurchaseReceiptNoteManager _purchaseReceiptNoteManager; + private readonly ISplitPackingRecAppService _splitPackingRecAppService; public PurchaseReceiptNoteAppService( IPurchaseReceiptNoteRepository repository , IPurchaseReceiptNoteManager purchaseReceiptNoteManager + , ISplitPackingRecAppService splitPackingRecAppService ) : base(repository) { _purchaseReceiptNoteManager = purchaseReceiptNoteManager; + _splitPackingRecAppService = splitPackingRecAppService; } [HttpPost("get-list-by-po/{poNumber}")] @@ -74,11 +78,34 @@ public class PurchaseReceiptNoteAppService : /// /// [HttpGet("detail-no-ok/{id}")] - public virtual async Task> GetDetailListByNoOkAsync(Guid id) + public virtual async Task> GetDetailListByNoOkAsync(Guid id) { var entity = await _repository.FindAsync(p => p.Id == id).ConfigureAwait(false); - return ObjectMapper.Map, List>(entity.Details + + var lst = ObjectMapper.Map, List>(entity.Details .Where(p => p.PurchaseReceiptInspectStatus == EnumPurchaseReceiptInspect.NOK).ToList()); + + if (lst.Count == 0) + { + return lst; + } + + #region 从拆箱记录表中取源箱码、目标箱码赋值给结果列表 + List strLst = lst.Select(itm => itm.PackingCode).Distinct().ToList(); + List splitPackingRecLst = await _splitPackingRecAppService.GetListByToPackingCode(strLst).ConfigureAwait(false); + + foreach (var item in lst) + { + var obj = splitPackingRecLst.FirstOrDefault(itm => itm.FromPackingCode == item.PackingCode); + if (obj != null) + { + item.FromPackingCode = obj.FromPackingCode; + item.ToPackingCode = obj.ToPackingCode; + } + } + #endregion + + return lst; } /// diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs index b4877764b..549d38639 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/PurchaseReceiptNotes/PurchaseReceiptNoteAutoMapperProfile.cs @@ -16,6 +16,12 @@ public partial class StoreApplicationAutoMapperProfile : Profile CreateMap() .ReverseMap(); + CreateMap() + .Ignore(x => x.FromPackingCode) + .Ignore(x => x.ToPackingCode) + .ReverseMap(); + + CreateMap() .IgnoreAuditedObjectProperties() .Ignore(x => x.MasterID) diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs index 3e09d396c..c66029c60 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/RecycledMaterialReceiptNotes/RecycledMaterialReceiptNoteAppService.cs @@ -78,4 +78,38 @@ public class RecycledMaterialReceiptNoteAppService : return ObjectMapper.Map(entity); } + + /// + /// 新增实体 + /// + /// CreateInput + [HttpPost("new-create")] + public async Task NewCreateAsync(RecycledMaterialReceiptNoteEditInput input) + { + var entity = ObjectMapper.Map(input); + + entity.Number = string.IsNullOrEmpty(input.Number) + ? await GenerateNumberAsync(nameof(RecycledMaterialReceiptNote), input.ActiveDate) + .ConfigureAwait(false) + : input.Number; + entity.SetId(GuidGenerator.Create()); + + foreach (var detail in entity.Details) + { + var detailNumber = await GenerateNumberAsync(nameof(RecycledMaterialReceiptNote), input.ActiveDate) + .ConfigureAwait(false); + detail.SetIdAndNumber(GuidGenerator, entity.Id, detailNumber); + var locationDto = await _locationAppService.GetByCodeAsync(detail.LocationCode).ConfigureAwait(false); + detail.LocationErpCode = locationDto.ErpLocationCode; + detail.LocationArea = locationDto.AreaCode; + detail.LocationGroup = locationDto.LocationGroupCode; + detail.WarehouseCode = locationDto.WarehouseCode; + var itemBasicDto = await _itemBasicAppService.GetByCodeAsync(detail.ItemCode).ConfigureAwait(false); + detail.StdPackQty = itemBasicDto.StdPackQty; + detail.Uom = itemBasicDto.BasicUom; + } + + entity = await _repository.InsertAsync(entity).ConfigureAwait(false); + return ObjectMapper.Map(entity); + } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs index 4a664821c..3188e6c7b 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/Notes/TransferNotes/TransferNoteAppService.cs @@ -9,13 +9,13 @@ 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.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; -using Win_in.Sfs.Wms.Store.SplitPackings; namespace Win_in.Sfs.Wms.Store.Application; @@ -32,19 +32,19 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase private readonly ITransferNoteManager _transferNoteManager; private readonly IBalanceAppService _balanceAppService; private readonly ILocationAppService _locationAppService; - private readonly ISplitPackingRecManager _splitPackingRecManager; + private readonly ISplitPackingRecAppService _splitPackingRecAppService; public TransferNoteAppService( ITransferNoteRepository repository, ITransferNoteManager transferNoteManager, IBalanceAppService balanceAppService, ILocationAppService locationAppService, - ISplitPackingRecManager splitPackingRecManager) : base(repository) + ISplitPackingRecAppService splitPackingRecAppService) : base(repository) { _transferNoteManager = transferNoteManager; _balanceAppService = balanceAppService; _locationAppService = locationAppService; - _splitPackingRecManager = splitPackingRecManager; + _splitPackingRecAppService = splitPackingRecAppService; } #region 东阳使用 @@ -128,9 +128,9 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase //插入拆箱记录表 foreach (var inputDetail in transferNoteEditInput.Details) { - List recLst = new List(); - SplitPackingRec packRec = new SplitPackingRec(); - packRec.OprType = Domain.Shared.SplitPackings.OprTypeEnum.SplitBox; + List recLst = new List(); + SplitPackingRecEditInput packRec = new SplitPackingRecEditInput(); + packRec.OprType = OprTypeEnum.SplitBox; packRec.FromPackingCode = inputDetail.FromPackingCode; //packRec.FromTopPackingCode = inputDetail.; packRec.FromStdPackQty = inputDetail.StdPackQty; @@ -154,7 +154,7 @@ public class TransferNoteAppService : SfsStoreWithDetailsAppServiceBase //packRec.ReceiptRecNumber = inputDetail.; //收货记录单 //packRec.PutOnShelfNumber = inputDetail.; //上架单 recLst.Add(packRec); - await _splitPackingRecManager.BatchInsertAsync(recLst).ConfigureAwait(false); + await _splitPackingRecAppService.BatchInsertAsync(recLst).ConfigureAwait(false); } //更新库存 transferNoteEditInput.Type = EnumTransSubType.Transfer_SplitPacking.ToString(); diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAppService.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAppService.cs deleted file mode 100644 index a4ca4913e..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAppService.cs +++ /dev/null @@ -1,42 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; -using Microsoft.AspNetCore.Authorization; -using Microsoft.AspNetCore.Components; -using Win_in.Sfs.Wms.Store.Application; -using Win_in.Sfs.Wms.Store.Application.Contracts; -using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.Domain.Shared; -using Win_in.Sfs.Wms.Store.SplitPackings.Inputs; - -namespace Win_in.Sfs.Wms.Store.SplitPackings; - -/// -/// 拆箱记录 -/// -//[Authorize] -[Route($"{StoreConsts.RootPath}split-packing-rec")] -public class SplitPackingRecAppService : - SfsStoreAppServiceBase - //, ISplitPackingRecAppService -{ - private readonly ISplitPackingRecManager _splitPackingRecManager; - - public SplitPackingRecAppService( - ISplitPackingRecRepository repository, - ISplitPackingRecManager splitPackingRecManager - ) : base(repository) - { - _splitPackingRecManager = splitPackingRecManager; - } - - public async Task BatchInsertAsync(List inputs) - { - List lst = ObjectMapper.Map, List>(inputs); - bool ret = await _splitPackingRecManager.BatchInsertAsync(lst).ConfigureAwait(false); - return ret; - } - -} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs deleted file mode 100644 index b38e602a3..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Application/SplitPackings/SplitPackingRecAutoMapperProfile.cs +++ /dev/null @@ -1,17 +0,0 @@ -using AutoMapper; -using Volo.Abp.AutoMapper; -using Win_in.Sfs.Basedata.Application.Contracts; -using Win_in.Sfs.Basedata.Domain; -using Win_in.Sfs.Wms.Store.Domain; -using Win_in.Sfs.Wms.Store.SplitPackings; - -namespace Win_in.Sfs.Wms.Store.Application; - -public partial class StoreApplicationAutoMapperProfile : Profile -{ - private void SplitPackingRecAutoMapperProfile() - { - CreateMap(); - CreateMap(); - } -} 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 57454f3d1..8dfb70eb6 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 @@ -104,7 +104,6 @@ public partial class StoreApplicationAutoMapperProfile : Profile #endregion ExchangeDataAutoMapperProfile(); - SplitPackingRecAutoMapperProfile(); } } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecManager.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecManager.cs deleted file mode 100644 index 6ce3f4e5c..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecManager.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Volo.Abp.Domain.Services; -using Win_in.Sfs.Wms.Store.Domain; - -namespace Win_in.Sfs.Wms.Store.SplitPackings; -public interface ISplitPackingRecManager : IDomainService -{ - Task BatchInsertAsync(List input); -} diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecRepository.cs deleted file mode 100644 index 692edb977..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/SplitPackings/ISplitPackingRecRepository.cs +++ /dev/null @@ -1,9 +0,0 @@ -using Win_in.Sfs.Shared.Domain; - -namespace Win_in.Sfs.Wms.Store.Domain; - -public interface ISplitPackingRecRepository : ISfsStoreRepositoryBase -{ -} - - diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj index a48cbcc3d..997f37960 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Domain/Win_in.Sfs.Wms.Store.Domain.csproj @@ -29,9 +29,6 @@ - - - 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 f959ddec9..dc0a7a333 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 @@ -105,7 +105,4 @@ public interface IStoreDbContext : IEfCoreDbContext #endregion public DbSet ExchangeDatas { get; } - - public DbSet SplitPackingRecs { get; } - } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs deleted file mode 100644 index 672a8bdc2..000000000 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.EntityFrameworkCore/SplitPackings/SplitPackingRecEfCoreRepository.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Volo.Abp.EntityFrameworkCore; -using Win_in.Sfs.Label.Domain; -using Win_in.Sfs.Wms.Store.Domain; - -namespace Win_in.Sfs.Wms.Store.EntityFrameworkCore; - -public class SplitPackingRecEfCoreRepository : SfsStoreEfCoreRepositoryBase, ISplitPackingRecRepository -{ - public SplitPackingRecEfCoreRepository(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 b4973c9d4..9a5dbfa35 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 @@ -105,8 +105,6 @@ public class StoreDbContext : AbpDbContext, IStoreDbContext public DbSet ExchangeDatas { get; set; } - public DbSet SplitPackingRecs { get; set; } - public StoreDbContext(DbContextOptions options) : base(options) { 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 06cd36742..a26ec5dc9 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 @@ -122,10 +122,6 @@ public static class StoreDbContextModelCreatingExtensions //设置decimal的默认小数位数 builder.ConfigurePrecisionOfDecimal(); - - builder.ConfigureSplitPackingRec(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 707970ed4..0a5316749 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 @@ -124,7 +124,6 @@ public class StoreEntityFrameworkCoreModule : AbpModule #endregion context.Services.AddTransient(); - context.Services.AddTransient(); } diff --git a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs index c33adc601..601b86bbd 100644 --- a/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs +++ b/be/Modules/Store/src/Win_in.Sfs.Wms.Store.Event/Transactions/ItemTransformNoteEventHandler.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using System.Linq; using System.Threading.Tasks; using Volo.Abp.EventBus; using Volo.Abp.Uow; @@ -28,10 +29,11 @@ public class ItemTransformNoteEventHandler private async Task AddTransactionsAsync(ItemTransformNote note) { var inboundTransactions = new List(); - - inboundTransactions.AddRange(BuildTransactions(note)); - + var noTransactions = new List(); + inboundTransactions.AddRange(NewBuildTransactions(note));//原料+混拌料 + noTransactions.AddRange(BuildNoTransactions(note));//粉碎料 await TransactionAppService.AddManyAsync(inboundTransactions).ConfigureAwait(false); + await TransactionAppService.AddManyEmptyAsync(noTransactions).ConfigureAwait(false); } @@ -46,14 +48,16 @@ public class ItemTransformNoteEventHandler { var inboundTransactions = new List(); - + var noTransactions = new List(); //如果要做库存事务汇总,可以修改此处 foreach (var note in notes) { - inboundTransactions.AddRange(BuildTransactions(note)); + inboundTransactions.AddRange(NewBuildTransactions(note));//原料+混拌料 + noTransactions.AddRange(BuildNoTransactions(note));//粉碎料 } await TransactionAppService.AddManyAsync(inboundTransactions).ConfigureAwait(false); + await TransactionAppService.AddManyEmptyAsync(noTransactions).ConfigureAwait(false); } private static List BuildTransactions(ItemTransformNote note) @@ -131,4 +135,151 @@ public class ItemTransformNoteEventHandler return transactions; } + /// + /// 新回收料库存方法 + /// + /// + /// + + private static List NewBuildTransactions(ItemTransformNote note) + { + var transactions = new List(); + + //根据调整记录,构造库存转移记录(只添加原料得) + foreach (var detail in note.Details.Where(r => r.Remark == "原料")) + { + var transactionOut = new TransactionEditInput() + { + Worker = note.Worker, + JobNumber = note.JobNumber, + DocNumber = note.Number, + TransType = Type, + TransSubType = SubType, + TransInOut = EnumTransInOut.Out, + LocationArea = detail.FromLocationArea, + LocationGroup = detail.FromLocationGroup, + LocationErpCode = detail.FromLocationErpCode, + PackingCode = detail.FromPackingCode, + ItemCode = detail.ItemCode, + Lot = detail.FromLot, + Status = detail.FromStatus, + WarehouseCode = detail.FromWarehouseCode, + LocationCode = detail.FromLocationCode, + ContainerCode = detail.FromContainerCode, + SupplierBatch = detail.FromSupplierBatch, + ArriveDate = detail.FromArriveDate, + ProduceDate = detail.FromProduceDate, + ExpireDate = detail.FromExpireDate, + ItemName = detail.ItemName, + ItemDesc1 = detail.ItemDesc1, + ItemDesc2 = detail.ItemDesc2, + Uom = detail.Uom, + Qty = -detail.FromQty, + }; + + transactions.Add(transactionOut); + } + //混拌料添加事务 + var detailfirst = note.Details.First(r => r.Remark == "原料"); + var transactionIn = new TransactionEditInput() + { + Worker = note.Worker, + JobNumber = note.JobNumber, + DocNumber = note.Number, + TransType = Type, + TransSubType = SubType, + TransInOut = EnumTransInOut.In, + + PackingCode = detailfirst.ToPackingCode, + ItemCode = detailfirst.ToItemCode, + Lot = detailfirst.ToLot, + Status = detailfirst.ToStatus, + LocationArea = detailfirst.ToLocationArea, + LocationGroup = detailfirst.ToLocationGroup, + LocationErpCode = detailfirst.ToLocationErpCode, + WarehouseCode = detailfirst.ToWarehouseCode, + LocationCode = detailfirst.ToLocationCode, + ContainerCode = detailfirst.ToContainerCode, + SupplierBatch = detailfirst.ToSupplierBatch, + ArriveDate = detailfirst.ToArriveDate, + ProduceDate = detailfirst.ToProduceDate, + ExpireDate = detailfirst.ToExpireDate, + ItemName = detailfirst.ItemName, + ItemDesc1 = detailfirst.ItemDesc1, + ItemDesc2 = detailfirst.ItemDesc2, + Uom = detailfirst.Uom, + Qty = detailfirst.ToQty, + }; + transactions.Add(transactionIn); + + return transactions; + } + private static List BuildNoTransactions(ItemTransformNote note) + { + var transactions = new List(); + + //根据调整记录,构造库存转移记录(只添加原料得) + foreach (var detail in note.Details.Where(r => r.Remark != "原料")) + { + var transactionOut = new TransactionEditInput() + { + Worker = note.Worker, + JobNumber = note.JobNumber, + DocNumber = note.Number, + TransType = Type, + TransSubType = SubType, + TransInOut = EnumTransInOut.Out, + LocationArea = detail.FromLocationArea, + LocationGroup = detail.FromLocationGroup, + LocationErpCode = detail.FromLocationErpCode, + PackingCode = detail.FromPackingCode, + ItemCode = detail.ItemCode, + Lot = detail.FromLot, + Status = detail.FromStatus, + WarehouseCode = detail.FromWarehouseCode, + LocationCode = detail.FromLocationCode, + ContainerCode = detail.FromContainerCode, + SupplierBatch = detail.FromSupplierBatch, + ArriveDate = detail.FromArriveDate, + ProduceDate = detail.FromProduceDate, + ExpireDate = detail.FromExpireDate, + ItemName = detail.ItemName, + ItemDesc1 = detail.ItemDesc1, + ItemDesc2 = detail.ItemDesc2, + Uom = detail.Uom, + Qty = -detail.FromQty, + }; + transactions.Add(transactionOut); + var transactionIn = new TransactionEditInput() + { + Worker = note.Worker, + JobNumber = note.JobNumber, + DocNumber = note.Number, + TransType = Type, + TransSubType = SubType, + TransInOut = EnumTransInOut.In, + LocationArea = detail.FromLocationArea, + LocationGroup = detail.FromLocationGroup, + LocationErpCode = detail.FromLocationErpCode, + PackingCode = detail.FromPackingCode, + ItemCode = detail.ItemCode, + Lot = detail.FromLot, + Status = detail.FromStatus, + WarehouseCode = detail.FromWarehouseCode, + LocationCode = detail.FromLocationCode, + ContainerCode = detail.FromContainerCode, + SupplierBatch = detail.FromSupplierBatch, + ArriveDate = detail.FromArriveDate, + ProduceDate = detail.FromProduceDate, + ExpireDate = detail.FromExpireDate, + ItemName = detail.ItemName, + ItemDesc1 = detail.ItemDesc1, + ItemDesc2 = detail.ItemDesc2, + Uom = detail.Uom, + Qty = detail.FromQty, + }; + transactions.Add(transactionIn); + } + return transactions; + } } diff --git a/build/src/docker/publish/conf/settings/appsettings.Development.json b/build/src/docker/publish/conf/settings/appsettings.Development.json index 9cd8147cc..675ae449e 100644 --- a/build/src/docker/publish/conf/settings/appsettings.Development.json +++ b/build/src/docker/publish/conf/settings/appsettings.Development.json @@ -74,24 +74,24 @@ // "Store": "Server=localhost,21195;Database=Wms;Uid=sa;Pwd=aA123456!;timeout=6000;" // }, "ConnectionStrings": { - "AbpAuditLogging": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpBackgroundJobs": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpBlobStoring": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpFeatureManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpIdentity": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpIdentityServer": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpPermissionManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpSettingManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "AbpTenantManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Auth": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Basedata": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "FileStorage": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Inventory": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Job": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Label": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Message": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", - "Store": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;" + "AbpAuditLogging": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpBackgroundJobs": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpBlobStoring": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpFeatureManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpIdentity": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpIdentityServer": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpPermissionManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpSettingManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "AbpTenantManagement": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Auth": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Basedata": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "DataExchange": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "FileStorage": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Inventory": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Job": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Label": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Message": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;", + "Store": "Server=dev.ccwin-in.com,13319;Database=WMS_DongYang_Main_CC;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;" }, "IdentityClients": { "Default": {