From 59d96058614c671f095cc84194a6a8c43ef60f46 Mon Sep 17 00:00:00 2001 From: zhouhongjun <565221961@qq.com> Date: Thu, 22 Feb 2024 16:20:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=20=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BasedataPermissionDefinitionProvider.cs | 1 + .../PositionCode/DTOs/PositionCodeDTO.cs | 33 + .../PositionCode/IPositionCodeService.cs | 9 + .../Inputs/PositionCodeEditInput.cs | 39 + .../Inputs/PositionCodeImportInput.cs | 37 + .../PositionCode/PositionCodePermissions.cs | 21 + .../BasedataApplicationAutoMapperProfile.cs | 1 + .../PositionCode/PositionCodeAppService.cs | 42 + .../PositionCodeAutoMapperProfile.cs | 28 + .../PositionCode/IPositionCodeManager.cs | 9 + .../PositionCode/IPositionCodeRepository.cs | 8 + .../PositionCode/PositionCode.cs | 34 + .../PositionCode/PositionCodeManager.cs | 28 + .../BasedataDbContext.cs | 2 + ...asedataDbContextModelCreatingExtensions.cs | 1 + .../BasedataEntityFrameworkCoreModule.cs | 1 + .../20240222061733_myInit.Designer.cs | 3607 +++++++++++++++++ .../Migrations/20240222061733_myInit.cs | 1424 +++++++ .../BasedataDbContextModelSnapshot.cs | 314 +- ...ionCodeDbContextModelCreatingExtensions.cs | 35 + .../PositionCodeEfCoreRepository.cs | 12 + 21 files changed, 5561 insertions(+), 125 deletions(-) create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/DTOs/PositionCodeDTO.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/IPositionCodeService.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeEditInput.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeImportInput.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/PositionCodePermissions.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAppService.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAutoMapperProfile.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeManager.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeRepository.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCode.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCodeManager.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.Designer.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs create mode 100644 be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeEfCoreRepository.cs diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Permissions/BasedataPermissionDefinitionProvider.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Permissions/BasedataPermissionDefinitionProvider.cs index 120cfe889..58fb44e62 100644 --- a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Permissions/BasedataPermissionDefinitionProvider.cs +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/Permissions/BasedataPermissionDefinitionProvider.cs @@ -35,6 +35,7 @@ public class BasedataPermissionDefinitionProvider : PermissionDefinitionProvider basedataGroup.AddItemCategoryPermission(); basedataGroup.AddItemPackPermission(); basedataGroup.AddCategoryPermission(); + basedataGroup.AddPositionCodePermission(); basedataGroup.AddWorkShopPermission(); basedataGroup.AddDockPermission(); basedataGroup.AddLocationGroupPermission(); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/DTOs/PositionCodeDTO.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/DTOs/PositionCodeDTO.cs new file mode 100644 index 000000000..812121e4a --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/DTOs/PositionCodeDTO.cs @@ -0,0 +1,33 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +[Display(Name = "位置码")] + +public class PositionCodeDTO : SfsBaseDataDTOBase, IHasCode +{ + /// + /// 代码 + /// + [Display(Name = "代码")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Code { get; set; } + /// + /// 物料号 + /// + [Display(Name = "物料号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string PartCode { get; set; } + /// + /// 标包数量 + /// + [Display(Name = "标包数量")] + public decimal StdPackQty { get; set; } + /// + /// 库位 + /// + [Display(Name = "库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string LocationCode { get; set; } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/IPositionCodeService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/IPositionCodeService.cs new file mode 100644 index 000000000..b1a2e43a9 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/IPositionCodeService.cs @@ -0,0 +1,9 @@ +using Win_in.Sfs.Shared.Application.Contracts; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +public interface IPositionCodeService + : ISfsBaseDataAppServiceBase + , ISfsGetByCodeAppService +{ +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeEditInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeEditInput.cs new file mode 100644 index 000000000..d1d8c0cc7 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeEditInput.cs @@ -0,0 +1,39 @@ +using System; +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +[Serializable] +public class PositionCodeEditInput : SfsBaseDataCreateOrUpdateInputBase +{ + #region Base + /// + /// 物料号 + /// + [Display(Name = "物料号")] + public string PartCode { get; set; } + /// + /// 标包数量 + /// + [Display(Name = "标包数量")] + public decimal StdPackQty { get; set; } + /// + /// 库位 + /// + [Display(Name = "库位")] + public string LocationCode { get; set; } + + + #endregion + + #region Create + /// + /// 代码 + /// + [Display(Name = "代码")] + [Required(ErrorMessage = "{0}是必填项")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Code { get; set; } + #endregion +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeImportInput.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeImportInput.cs new file mode 100644 index 000000000..75b16138b --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/Inputs/PositionCodeImportInput.cs @@ -0,0 +1,37 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +[Display(Name = "位置码")] +public class PositionCodeImportInput : SfsBaseDataImportInputBase +{ + /// + /// 代码 + /// + [Key] + [Display(Name = "代码")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string Code { get; set; } + + /// + /// 物料号 + /// + [Display(Name = "物料号")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string PartCode { get; set; } + + /// + /// 标包数量 + /// + [Display(Name = "标包数量")] + [Required(ErrorMessage = "{0}是必填项")] + public decimal StdPackQty { get; set; } + + /// + /// 库位 + /// + [Display(Name = "库位")] + [StringLength(SfsEfCorePropertyConst.CodeLength, ErrorMessage = "{0}最多输入{1}个字符")] + public string LocationCode { get; set; } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/PositionCodePermissions.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/PositionCodePermissions.cs new file mode 100644 index 000000000..596671428 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application.Contracts/PositionCode/PositionCodePermissions.cs @@ -0,0 +1,21 @@ +using Volo.Abp.Authorization.Permissions; +using Win_in.Sfs.Basedata.Domain; + +namespace Win_in.Sfs.Basedata.Application.Contracts; + +public static class PositionCodePermissions +{ + + public const string Default = BasedataPermissions.GroupName + "." + nameof(PositionCode); + public const string Create = Default + "." + BasedataPermissions.CreateStr; + public const string Update = Default + "." + BasedataPermissions.UpdateStr; + public const string Delete = Default + "." + BasedataPermissions.DeleteStr; + + public static void AddPositionCodePermission(this PermissionGroupDefinition permissionGroup) + { + var positionCodePermission = permissionGroup.AddPermission(Default, BasedataPermissionDefinitionProvider.L(nameof(PositionCode))); + positionCodePermission.AddChild(Create, BasedataPermissionDefinitionProvider.L(BasedataPermissions.CreateStr)); + positionCodePermission.AddChild(Update, BasedataPermissionDefinitionProvider.L(BasedataPermissions.UpdateStr)); + positionCodePermission.AddChild(Delete, BasedataPermissionDefinitionProvider.L(BasedataPermissions.DeleteStr)); + } +} 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 6ed3caf50..3d013d48b 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 @@ -12,6 +12,7 @@ public partial class BasedataApplicationAutoMapperProfile : Profile CalendarAutoMapperProfile(); InterfaceCalendarAutoMapperProfile(); CategoryAutoMapperProfile(); + PositionCodeAutoMapperProfile(); CurrencyAutoMapperProfile(); CurrencyExchangeAutoMapperProfile(); CustomerAddressAutoMapperProfile(); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAppService.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAppService.cs new file mode 100644 index 000000000..ed662e42a --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAppService.cs @@ -0,0 +1,42 @@ +using System.Threading.Tasks; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; +using Volo.Abp; +using Volo.Abp.Caching; +using Volo.Abp.Uow; +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}position-code")] + +public class PositionCodeAppService + : SfsBaseDataWithCodeAppServiceBase + , IPositionCodeService +{ + private readonly IPositionCodeManager _manager; + + public PositionCodeAppService(IPositionCodeRepository repository, IDistributedCache cache, IPositionCodeManager manager) : base(repository, cache) + { + base.CreatePolicyName = CategoryPermissions.Create; + base.UpdatePolicyName = CategoryPermissions.Update; + base.DeletePolicyName = CategoryPermissions.Delete; + _manager = manager; + } + + + [HttpPost("")] + [UnitOfWork] + public override async Task CreateAsync(PositionCodeEditInput input) + { + var existEntity = await GetByCodeAsync(input.Code).ConfigureAwait(false); + if (existEntity != null) + { + throw new UserFriendlyException($"{input.Code} 已存在"); + } + return await base.CreateAsync(input).ConfigureAwait(false); + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAutoMapperProfile.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAutoMapperProfile.cs new file mode 100644 index 000000000..a5f1c42c2 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Application/PositionCode/PositionCodeAutoMapperProfile.cs @@ -0,0 +1,28 @@ +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 PositionCodeAutoMapperProfile() + { + CreateMap() + .ReverseMap(); + + CreateMap() + .IgnoreAuditedObjectProperties() + .Ignore(x => x.TenantId) + //.Ignore(x => x.Remark) + .Ignore(x => x.ExtraProperties) + .Ignore(x => x.ConcurrencyStamp) + ; + + CreateMap() + .Ignore(x => x.ReportStatus) + .Ignore(x => x.ReportReason); + + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeManager.cs new file mode 100644 index 000000000..b8e6110ce --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeManager.cs @@ -0,0 +1,9 @@ +using Volo.Abp.Domain.Services; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Domain; + +public interface IPositionCodeManager : IDomainService, IBulkImportService +{ + +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeRepository.cs new file mode 100644 index 000000000..897547a28 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/IPositionCodeRepository.cs @@ -0,0 +1,8 @@ +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.Domain; + +public interface IPositionCodeRepository : ISfsBaseDataRepositoryBase, ISfsBulkRepositoryBase +{ + +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCode.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCode.cs new file mode 100644 index 000000000..eecae256c --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCode.cs @@ -0,0 +1,34 @@ +using System.ComponentModel.DataAnnotations; +using Win_in.Sfs.Shared.Domain; +using Win_in.Sfs.Shared.Domain.Entities; + +namespace Win_in.Sfs.Basedata.Domain; + +/// +/// 位置码 +/// +public class PositionCode : SfsBaseDataAggregateRootBase, IHasCode +{ + /// + /// 位置代码 + /// + [Display(Name = "位置代码")] + [IgnoreUpdate] + public string Code { get; set; } + /// + /// 物料号 + /// + [Display(Name = "物料号")] + public string PartCode { get; set; } + /// + /// 标包数量 + /// + [Display(Name = "标包数量")] + public decimal StdPackQty { get; set; } + /// + /// 库位 + /// + [Display(Name = "库位")] + public string LocationCode { get; set; } + +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCodeManager.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCodeManager.cs new file mode 100644 index 000000000..33f1dbb03 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.Domain/PositionCode/PositionCodeManager.cs @@ -0,0 +1,28 @@ +using System.Collections.Generic; +using System.Threading.Tasks; +using Volo.Abp.Domain.Services; + +namespace Win_in.Sfs.Basedata.Domain; + +public class PositionCodeManager : DomainService, IPositionCodeManager +{ + private readonly IPositionCodeRepository _repository; + + public PositionCodeManager(IPositionCodeRepository repository) + { + _repository = repository; + } + + /// + /// 执行导入 + /// + public virtual async Task ImportDataAsync(List mergeEntities, List deleteEntities = null) + { + if (deleteEntities != null && deleteEntities.Count > 0) + { + await _repository.BulkDeleteAsync(deleteEntities).ConfigureAwait(false); + } + + await _repository.BulkMergeAsync(mergeEntities).ConfigureAwait(false); + } +} 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 1dbbf4cb5..d921bbb31 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 @@ -55,6 +55,8 @@ public class BasedataDbContext : AbpDbContext, IBasedataDbCon public DbSet ItemGuideBooks { get; set; } public DbSet Dicts { get; set; } + public DbSet PositionCodes { 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 ad0cabba6..9bfd17f8d 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 @@ -65,6 +65,7 @@ public static class BasedataDbContextModelCreatingExtensions builder.ConfigureDocumentSetting(options); //设置decimal的默认小数位数 builder.ConfigurePrecisionOfDecimal(); + builder.ConfigurePositionCode(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 3193de4a3..abb5ceb36 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 @@ -54,6 +54,7 @@ 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(); diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.Designer.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.Designer.cs new file mode 100644 index 000000000..1118c65d3 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.Designer.cs @@ -0,0 +1,3607 @@ +// +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("20240222061733_myInit")] + partial class myInit + { + 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") + .IsUnique(); + + 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("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") + .HasMaxLength(64) + .HasColumnType("nvarchar(64)"); + + b.Property("Remark") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") + .HasColumnName("Remark"); + + b.Property("SupplierId") + .HasMaxLength(64) + .HasColumnType("uniqueidentifier"); + + b.Property("TenantId") + .HasColumnType("uniqueidentifier") + .HasColumnName("TenantId"); + + b.HasKey("Id"); + + b.HasIndex("Code") + .IsUnique(); + + 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/20240222061733_myInit.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.cs new file mode 100644 index 000000000..28d4bc800 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/Migrations/20240222061733_myInit.cs @@ -0,0 +1,1424 @@ +using System; +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace Win_in.Sfs.Basedata.Migrations +{ + public partial class myInit : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.RenameTable( + name: "Basedata_WorkStation", + schema: "dbo", + newName: "Basedata_WorkStation"); + + migrationBuilder.RenameTable( + name: "Basedata_WorkShop", + schema: "dbo", + newName: "Basedata_WorkShop"); + + migrationBuilder.RenameTable( + name: "Basedata_WorkGroup", + schema: "dbo", + newName: "Basedata_WorkGroup"); + + migrationBuilder.RenameTable( + name: "Basedata_Warehouse", + schema: "dbo", + newName: "Basedata_Warehouse"); + + migrationBuilder.RenameTable( + name: "Basedata_Uom", + schema: "dbo", + newName: "Basedata_Uom"); + + migrationBuilder.RenameTable( + name: "Basedata_TransactionType", + schema: "dbo", + newName: "Basedata_TransactionType"); + + migrationBuilder.RenameTable( + name: "Basedata_Team", + schema: "dbo", + newName: "Basedata_Team"); + + migrationBuilder.RenameTable( + name: "Basedata_SupplierTimeWindow", + schema: "dbo", + newName: "Basedata_SupplierTimeWindow"); + + migrationBuilder.RenameTable( + name: "Basedata_SupplierItem", + schema: "dbo", + newName: "Basedata_SupplierItem"); + + migrationBuilder.RenameTable( + name: "Basedata_Supplier", + schema: "dbo", + newName: "Basedata_Supplier"); + + migrationBuilder.RenameTable( + name: "Basedata_StdCostPriceSheet", + schema: "dbo", + newName: "Basedata_StdCostPriceSheet"); + + migrationBuilder.RenameTable( + name: "Basedata_Shift", + schema: "dbo", + newName: "Basedata_Shift"); + + migrationBuilder.RenameTable( + name: "Basedata_SalePriceSheet", + schema: "dbo", + newName: "Basedata_SalePriceSheet"); + + migrationBuilder.RenameTable( + name: "Basedata_PurchasePriceSheet", + schema: "dbo", + newName: "Basedata_PurchasePriceSheet"); + + migrationBuilder.RenameTable( + name: "Basedata_Project", + schema: "dbo", + newName: "Basedata_Project"); + + migrationBuilder.RenameTable( + name: "Basedata_ProductionLineItem", + schema: "dbo", + newName: "Basedata_ProductionLineItem"); + + migrationBuilder.RenameTable( + name: "Basedata_ProductionLine", + schema: "dbo", + newName: "Basedata_ProductionLine"); + + migrationBuilder.RenameTable( + name: "Basedata_Machine", + schema: "dbo", + newName: "Basedata_Machine"); + + migrationBuilder.RenameTable( + name: "Basedata_LocationGroup", + schema: "dbo", + newName: "Basedata_LocationGroup"); + + migrationBuilder.RenameTable( + name: "Basedata_Location", + schema: "dbo", + newName: "Basedata_Location"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemStoreRelation", + schema: "dbo", + newName: "Basedata_ItemStoreRelation"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemSafetyStock", + schema: "dbo", + newName: "Basedata_ItemSafetyStock"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemQuality", + schema: "dbo", + newName: "Basedata_ItemQuality"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemPack", + schema: "dbo", + newName: "Basedata_ItemPack"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemGuideBook", + schema: "dbo", + newName: "Basedata_ItemGuideBook"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemCategory", + schema: "dbo", + newName: "Basedata_ItemCategory"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemBasic", + schema: "dbo", + newName: "Basedata_ItemBasic"); + + migrationBuilder.RenameTable( + name: "Basedata_InterfaceCalendar", + schema: "dbo", + newName: "Basedata_InterfaceCalendar"); + + migrationBuilder.RenameTable( + name: "Basedata_ErpLocation", + schema: "dbo", + newName: "Basedata_ErpLocation"); + + migrationBuilder.RenameTable( + name: "Basedata_DocumentSetting", + schema: "dbo", + newName: "Basedata_DocumentSetting"); + + migrationBuilder.RenameTable( + name: "Basedata_Dock", + schema: "dbo", + newName: "Basedata_Dock"); + + migrationBuilder.RenameTable( + name: "Basedata_DictItem", + schema: "dbo", + newName: "Basedata_DictItem"); + + migrationBuilder.RenameTable( + name: "Basedata_Dict", + schema: "dbo", + newName: "Basedata_Dict"); + + migrationBuilder.RenameTable( + name: "Basedata_CustomerItem", + schema: "dbo", + newName: "Basedata_CustomerItem"); + + migrationBuilder.RenameTable( + name: "Basedata_CustomerAddress", + schema: "dbo", + newName: "Basedata_CustomerAddress"); + + migrationBuilder.RenameTable( + name: "Basedata_Customer", + schema: "dbo", + newName: "Basedata_Customer"); + + migrationBuilder.RenameTable( + name: "Basedata_CurrencyExchange", + schema: "dbo", + newName: "Basedata_CurrencyExchange"); + + migrationBuilder.RenameTable( + name: "Basedata_Currency", + schema: "dbo", + newName: "Basedata_Currency"); + + migrationBuilder.RenameTable( + name: "Basedata_Category", + schema: "dbo", + newName: "Basedata_Category"); + + migrationBuilder.RenameTable( + name: "Basedata_Calendar", + schema: "dbo", + newName: "Basedata_Calendar"); + + migrationBuilder.RenameTable( + name: "Basedata_Bom", + schema: "dbo", + newName: "Basedata_Bom"); + + migrationBuilder.RenameTable( + name: "Basedata_Area", + schema: "dbo", + newName: "Basedata_Area"); + + migrationBuilder.RenameTable( + name: "Basedata_AQL", + schema: "dbo", + newName: "Basedata_AQL"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_WorkStation", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_WorkShop", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_WorkGroup", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Warehouse", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Uom", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_TransactionType", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Team", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_SupplierTimeWindow", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_SupplierItem", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Supplier", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_StdCostPriceSheet", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Shift", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_SalePriceSheet", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_PurchasePriceSheet", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Project", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ProductionLineItem", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ProductionLine", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Machine", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_LocationGroup", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Location", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemStoreRelation", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemSafetyStock", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemQuality", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemPack", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemGuideBook", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemCategory", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ItemBasic", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_ErpLocation", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_DocumentSetting", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Dock", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_DictItem", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Dict", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_CustomerItem", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Customer", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_CurrencyExchange", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Currency", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Category", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Calendar", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Bom", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_Area", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "Basedata_AQL", + type: "nvarchar(3072)", + maxLength: 3072, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldMaxLength: 4096, + oldNullable: true); + + 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.CreateIndex( + name: "IX_Basedata_PositionCode_Code", + table: "Basedata_PositionCode", + column: "Code", + unique: true); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "Basedata_PositionCode"); + + migrationBuilder.EnsureSchema( + name: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_WorkStation", + newName: "Basedata_WorkStation", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_WorkShop", + newName: "Basedata_WorkShop", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_WorkGroup", + newName: "Basedata_WorkGroup", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Warehouse", + newName: "Basedata_Warehouse", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Uom", + newName: "Basedata_Uom", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_TransactionType", + newName: "Basedata_TransactionType", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Team", + newName: "Basedata_Team", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_SupplierTimeWindow", + newName: "Basedata_SupplierTimeWindow", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_SupplierItem", + newName: "Basedata_SupplierItem", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Supplier", + newName: "Basedata_Supplier", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_StdCostPriceSheet", + newName: "Basedata_StdCostPriceSheet", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Shift", + newName: "Basedata_Shift", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_SalePriceSheet", + newName: "Basedata_SalePriceSheet", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_PurchasePriceSheet", + newName: "Basedata_PurchasePriceSheet", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Project", + newName: "Basedata_Project", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ProductionLineItem", + newName: "Basedata_ProductionLineItem", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ProductionLine", + newName: "Basedata_ProductionLine", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Machine", + newName: "Basedata_Machine", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_LocationGroup", + newName: "Basedata_LocationGroup", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Location", + newName: "Basedata_Location", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemStoreRelation", + newName: "Basedata_ItemStoreRelation", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemSafetyStock", + newName: "Basedata_ItemSafetyStock", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemQuality", + newName: "Basedata_ItemQuality", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemPack", + newName: "Basedata_ItemPack", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemGuideBook", + newName: "Basedata_ItemGuideBook", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemCategory", + newName: "Basedata_ItemCategory", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ItemBasic", + newName: "Basedata_ItemBasic", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_InterfaceCalendar", + newName: "Basedata_InterfaceCalendar", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_ErpLocation", + newName: "Basedata_ErpLocation", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_DocumentSetting", + newName: "Basedata_DocumentSetting", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Dock", + newName: "Basedata_Dock", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_DictItem", + newName: "Basedata_DictItem", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Dict", + newName: "Basedata_Dict", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_CustomerItem", + newName: "Basedata_CustomerItem", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_CustomerAddress", + newName: "Basedata_CustomerAddress", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Customer", + newName: "Basedata_Customer", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_CurrencyExchange", + newName: "Basedata_CurrencyExchange", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Currency", + newName: "Basedata_Currency", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Category", + newName: "Basedata_Category", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Calendar", + newName: "Basedata_Calendar", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Bom", + newName: "Basedata_Bom", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_Area", + newName: "Basedata_Area", + newSchema: "dbo"); + + migrationBuilder.RenameTable( + name: "Basedata_AQL", + newName: "Basedata_AQL", + newSchema: "dbo"); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_WorkStation", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_WorkShop", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_WorkGroup", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Warehouse", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Uom", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_TransactionType", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Team", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_SupplierTimeWindow", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_SupplierItem", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Supplier", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_StdCostPriceSheet", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Shift", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_SalePriceSheet", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_PurchasePriceSheet", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Project", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ProductionLineItem", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ProductionLine", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Machine", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_LocationGroup", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Location", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemStoreRelation", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemSafetyStock", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemQuality", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemPack", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemGuideBook", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemCategory", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ItemBasic", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_ErpLocation", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_DocumentSetting", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Dock", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_DictItem", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Dict", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_CustomerItem", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Customer", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_CurrencyExchange", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Currency", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Category", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Calendar", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Bom", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_Area", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + schema: "dbo", + table: "Basedata_AQL", + type: "nvarchar(max)", + maxLength: 4096, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(3072)", + oldMaxLength: 3072, + oldNullable: true); + } + } +} 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 index b7215e09b..83e4e06b7 100644 --- 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 @@ -73,8 +73,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnName("LastModifierId"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SamplePercent") @@ -97,7 +97,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("SupplierCode", "ItemCode", "FloorQty") .IsUnique(); - b.ToTable("Basedata_AQL", "dbo"); + b.ToTable("Basedata_AQL", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Area", b => @@ -153,8 +153,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -171,7 +171,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Area", "dbo"); + b.ToTable("Basedata_Area", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Bom", b => @@ -253,8 +253,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -271,7 +271,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Product", "Component") .IsUnique(); - b.ToTable("Basedata_Bom", "dbo"); + b.ToTable("Basedata_Bom", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Calendar", b => @@ -316,8 +316,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)"); + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)"); b.Property("Status") .IsRequired() @@ -334,7 +334,7 @@ namespace Win_in.Sfs.Basedata.Migrations .IsUnique() .HasFilter("[Module] IS NOT NULL"); - b.ToTable("Basedata_Calendar", "dbo"); + b.ToTable("Basedata_Calendar", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Category", b => @@ -382,8 +382,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -395,7 +395,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Category", "dbo"); + b.ToTable("Basedata_Category", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Currency", b => @@ -447,8 +447,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -460,7 +460,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Currency", "dbo"); + b.ToTable("Basedata_Currency", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CurrencyExchange", b => @@ -510,8 +510,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("decimal(18,6)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -523,7 +523,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("CurrencyId", "BasicCurrencyId") .IsUnique(); - b.ToTable("Basedata_CurrencyExchange", "dbo"); + b.ToTable("Basedata_CurrencyExchange", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Customer", b => @@ -602,8 +602,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("ShortName") @@ -624,7 +624,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Customer", "dbo"); + b.ToTable("Basedata_Customer", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerAddress", b => @@ -712,7 +712,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code", "CustomerCode") .IsUnique(); - b.ToTable("Basedata_CustomerAddress", "dbo"); + b.ToTable("Basedata_CustomerAddress", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.CustomerItem", b => @@ -775,8 +775,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnName("LastModifierId"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -792,7 +792,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("CustomerCode", "ItemCode") .IsUnique(); - b.ToTable("Basedata_CustomerItem", "dbo"); + b.ToTable("Basedata_CustomerItem", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dict", b => @@ -840,8 +840,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -853,7 +853,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Dict", "dbo"); + b.ToTable("Basedata_Dict", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => @@ -897,8 +897,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -913,7 +913,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("MasterId"); - b.ToTable("Basedata_DictItem", "dbo"); + b.ToTable("Basedata_DictItem", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Dock", b => @@ -965,8 +965,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -982,7 +982,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Dock", "dbo"); + b.ToTable("Basedata_Dock", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DocumentSetting", b => @@ -1046,8 +1046,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("int"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -1063,7 +1063,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_DocumentSetting", "dbo"); + b.ToTable("Basedata_DocumentSetting", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ErpLocation", b => @@ -1111,8 +1111,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -1133,7 +1133,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_ErpLocation", "dbo"); + b.ToTable("Basedata_ErpLocation", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.InterfaceCalendar", b => @@ -1212,7 +1212,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_InterfaceCalendar", "dbo"); + b.ToTable("Basedata_InterfaceCalendar", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemBasic", b => @@ -1319,8 +1319,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("Status") @@ -1356,7 +1356,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_ItemBasic", "dbo"); + b.ToTable("Basedata_ItemBasic", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemCategory", b => @@ -1401,8 +1401,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnName("LastModifierId"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -1419,7 +1419,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("CategoryCode", "ItemCode") .IsUnique(); - b.ToTable("Basedata_ItemCategory", "dbo"); + b.ToTable("Basedata_ItemCategory", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemGuideBook", b => @@ -1471,8 +1471,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(max)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("Step") @@ -1488,7 +1488,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("ItemCode") .IsUnique(); - b.ToTable("Basedata_ItemGuideBook", "dbo"); + b.ToTable("Basedata_ItemGuideBook", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemPack", b => @@ -1548,8 +1548,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("decimal(18,6)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -1561,7 +1561,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("ItemCode", "PackCode") .IsUnique(); - b.ToTable("Basedata_ItemPack", "dbo"); + b.ToTable("Basedata_ItemPack", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemQuality", b => @@ -1610,8 +1610,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnName("LastModifierId"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("Status") @@ -1633,7 +1633,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("ItemCode", "SupplierCode") .IsUnique(); - b.ToTable("Basedata_ItemQuality", "dbo"); + b.ToTable("Basedata_ItemQuality", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemSafetyStock", b => @@ -1689,8 +1689,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("decimal(18,6)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SafetyStock") @@ -1720,7 +1720,7 @@ namespace Win_in.Sfs.Basedata.Migrations .IsUnique() .HasFilter("[StoreValue] IS NOT NULL"); - b.ToTable("Basedata_ItemSafetyStock", "dbo"); + b.ToTable("Basedata_ItemSafetyStock", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ItemStoreRelation", b => @@ -1781,8 +1781,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("StoreRelationType") @@ -1816,7 +1816,7 @@ namespace Win_in.Sfs.Basedata.Migrations .IsUnique() .HasFilter("[StoreValue] IS NOT NULL"); - b.ToTable("Basedata_ItemStoreRelation", "dbo"); + b.ToTable("Basedata_ItemStoreRelation", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Location", b => @@ -1979,8 +1979,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasDefaultValue(0); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("RowCode") @@ -2016,7 +2016,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Location", "dbo"); + b.ToTable("Basedata_Location", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.LocationGroup", b => @@ -2168,8 +2168,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasDefaultValue(0); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2186,7 +2186,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_LocationGroup", "dbo"); + b.ToTable("Basedata_LocationGroup", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Machine", b => @@ -2238,8 +2238,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("uniqueidentifier"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2259,7 +2259,71 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Machine", "dbo"); + 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") + .IsUnique(); + + b.ToTable("Basedata_PositionCode", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLine", b => @@ -2319,8 +2383,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2341,7 +2405,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_ProductionLine", "dbo"); + b.ToTable("Basedata_ProductionLine", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.ProductionLineItem", b => @@ -2384,8 +2448,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(450)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2397,7 +2461,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("ProdLineCode", "ItemCode") .IsUnique(); - b.ToTable("Basedata_ProductionLineItem", "dbo"); + b.ToTable("Basedata_ProductionLineItem", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Project", b => @@ -2455,8 +2519,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2468,7 +2532,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Project", "dbo"); + b.ToTable("Basedata_Project", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.PurchasePriceSheet", b => @@ -2520,8 +2584,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SupplierId") @@ -2537,7 +2601,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_PurchasePriceSheet", "dbo"); + b.ToTable("Basedata_PurchasePriceSheet", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SalePriceSheet", b => @@ -2593,8 +2657,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2606,7 +2670,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code", "CustomerId") .IsUnique(); - b.ToTable("Basedata_SalePriceSheet", "dbo"); + b.ToTable("Basedata_SalePriceSheet", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Shift", b => @@ -2663,8 +2727,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -2676,7 +2740,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Shift", "dbo"); + b.ToTable("Basedata_Shift", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.StdCostPriceSheet", b => @@ -2729,8 +2793,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SupplierId") @@ -2745,7 +2809,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code", "SupplierId") .IsUnique(); - b.ToTable("Basedata_StdCostPriceSheet", "dbo"); + b.ToTable("Basedata_StdCostPriceSheet", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Supplier", b => @@ -2831,8 +2895,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("ShortName") @@ -2856,7 +2920,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Supplier", "dbo"); + b.ToTable("Basedata_Supplier", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierItem", b => @@ -2903,8 +2967,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("decimal(18,6)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SupplierCode") @@ -2941,7 +3005,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("SupplierCode", "ItemCode") .IsUnique(); - b.ToTable("Basedata_SupplierItem", "dbo"); + b.ToTable("Basedata_SupplierItem", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.SupplierTimeWindow", b => @@ -2976,8 +3040,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnName("LastModifierId"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("SupplierCode") @@ -3009,7 +3073,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("SupplierCode", "TimeSlot", "Week") .IsUnique(); - b.ToTable("Basedata_SupplierTimeWindow", "dbo"); + b.ToTable("Basedata_SupplierTimeWindow", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Team", b => @@ -3061,8 +3125,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3074,7 +3138,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Team", "dbo"); + b.ToTable("Basedata_Team", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.TransactionType", b => @@ -3162,8 +3226,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3185,7 +3249,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("TransType", "TransSubType") .IsUnique(); - b.ToTable("Basedata_TransactionType", "dbo"); + b.ToTable("Basedata_TransactionType", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Uom", b => @@ -3233,8 +3297,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3251,7 +3315,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Uom", "dbo"); + b.ToTable("Basedata_Uom", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.Warehouse", b => @@ -3299,8 +3363,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3312,7 +3376,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_Warehouse", "dbo"); + b.ToTable("Basedata_Warehouse", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkGroup", b => @@ -3360,8 +3424,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3378,7 +3442,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_WorkGroup", "dbo"); + b.ToTable("Basedata_WorkGroup", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkShop", b => @@ -3427,8 +3491,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3440,7 +3504,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_WorkShop", "dbo"); + b.ToTable("Basedata_WorkShop", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.WorkStation", b => @@ -3502,8 +3566,8 @@ namespace Win_in.Sfs.Basedata.Migrations .HasColumnType("nvarchar(64)"); b.Property("Remark") - .HasMaxLength(4096) - .HasColumnType("nvarchar(max)") + .HasMaxLength(3072) + .HasColumnType("nvarchar(3072)") .HasColumnName("Remark"); b.Property("TenantId") @@ -3519,7 +3583,7 @@ namespace Win_in.Sfs.Basedata.Migrations b.HasIndex("Code") .IsUnique(); - b.ToTable("Basedata_WorkStation", "dbo"); + b.ToTable("Basedata_WorkStation", (string)null); }); modelBuilder.Entity("Win_in.Sfs.Basedata.Domain.DictItem", b => 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 new file mode 100644 index 000000000..da0798323 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeDbContextModelCreatingExtensions.cs @@ -0,0 +1,35 @@ +using Microsoft.EntityFrameworkCore; +using Volo.Abp.EntityFrameworkCore.Modeling; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Shared.Domain.Shared; +using Win_in.Sfs.Shared.EntityFrameworkCore; + +namespace Win_in.Sfs.Basedata.EntityFrameworkCore; + +public static class PositionCodeDbContextModelCreatingExtensions +{ + public static void ConfigurePositionCode(this ModelBuilder builder, BasedataModelBuilderConfigurationOptions options) + { + builder.Entity(b => + { + //Configure table & schema name + b.ToTable(options.TablePrefix + nameof(PositionCode), options.Schema); + //Configure ABP properties + b.ConfigureByConvention(); + //Configure Sfs base properties + b.ConfigureSfsBase(); + + //Properties + b.Property(q => q.Code).IsRequired().HasMaxLength(SfsPropertyConst.CodeLength); + + b.Property(q => q.LocationCode).HasMaxLength(SfsPropertyConst.CodeLength); + b.Property(q => q.PartCode).HasMaxLength(SfsPropertyConst.CodeLength); + + //Relations + //None + + //Indexes + b.HasIndex(q => new { q.Code }).IsUnique(); + }); + } +} diff --git a/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeEfCoreRepository.cs b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeEfCoreRepository.cs new file mode 100644 index 000000000..e3d8a8d42 --- /dev/null +++ b/be/Modules/BaseData/src/Win_in.Sfs.Basedata.EntityFrameworkCore/PositionCode/PositionCodeEfCoreRepository.cs @@ -0,0 +1,12 @@ +using Volo.Abp.EntityFrameworkCore; +using Win_in.Sfs.Basedata.Domain; +using Win_in.Sfs.Shared.Domain; + +namespace Win_in.Sfs.Basedata.EntityFrameworkCore; + +public class PositionCodeEfCoreRepository : SfsBaseDataEfCoreRepositoryBase, IPositionCodeRepository, ISfsBulkRepositoryBase +{ + public PositionCodeEfCoreRepository(IDbContextProvider dbContextProvider) : base(dbContextProvider) + { + } +}