diff --git a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs index 567d4b5..f956c6b 100644 --- a/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs +++ b/API/TaskManager.Entity/11-18/SUPPLIER_PRO_ATTACHMENT_DATA.cs @@ -7,10 +7,10 @@ namespace TaskManager.Entity.Entitys /// public class SUPPLIER_PRO_ATTACHMENT_DATA : BaseEntity { + /// /// 供应商代码 /// - [ExporterHeader(DisplayName = "供应商代码")] public string SupplierCode { get; set; } /// diff --git a/API/TaskManager.Entity/Entity.cs b/API/TaskManager.Entity/Entity.cs index 7985552..d55d9a7 100644 --- a/API/TaskManager.Entity/Entity.cs +++ b/API/TaskManager.Entity/Entity.cs @@ -15,7 +15,7 @@ namespace TaskManager.Entity public interface IDoExecute { - Task ExecuteAsync(string url, string path, string takName); + Task ExecuteAsync(string url, string path, string takName,string client); } public class TaskConifgure:BaseEntity { @@ -67,10 +67,50 @@ namespace TaskManager.Entity } - public class TaskLog:BaseEntity + + public class TEA_SUBSCRIBE { + [Key] + [Required] + public Guid GUID { get; set; } + + [MaxLength(50)] + public string TableName { get; set; } + + [MaxLength(50)] + public string Creator { get; set; } + + [MaxLength(50)] + public string Subscriber { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public int UID { get; set; } + + [MaxLength(50)] + public string CreateUser { get; set; } + + [Required] + public DateTime CreateTime { get; set; } + + public string Remark { get; set; } + + [MaxLength(50)] + public string UpdateUser { get; set; } + + public DateTime? UpdateTime { get; set; } + + [Required] + public bool Enable { get; set; } + } + + + + + public class TaskLog:BaseEntity + { + /// /// 详细描述 /// @@ -106,6 +146,10 @@ namespace TaskManager.Entity } public class BaseEntity { + public BaseEntity() + { + } + [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] [ExporterHeader(IsIgnore=true)] @@ -122,6 +166,9 @@ namespace TaskManager.Entity public string? Remark { get; set; } [ExporterHeader(IsIgnore = true)] public Guid TaskId { get; set; } + + + } public class CherryReadBaseEntity:BaseEntity @@ -133,11 +180,7 @@ namespace TaskManager.Entity /// /// 同步ID /// - public string? Id { get; set; } - - - - + public string? Id { get; set; } } /// @@ -213,6 +256,11 @@ namespace TaskManager.Entity /// 最后更新时间(任务最后修改的时间戳,可为空) /// public DateTime? UpdateTime { get; set; } + /// + /// 已同步页数 + /// + [ExporterHeader(DisplayName = "更新完成时间")] + public int SyncedPageCount { get; set; } } @@ -375,9 +423,6 @@ namespace TaskManager.Entity public class SUPPLIER_MRP_MONTH : CherryReadBaseEntity { - - - /// /// 需求发布版次:M+6月物料需求计划风险确认接口对应需求版次,需求ID /// diff --git a/API/TaskManager.EntityFramework/JobDbContext.cs b/API/TaskManager.EntityFramework/JobDbContext.cs index 784d904..cabe64c 100644 --- a/API/TaskManager.EntityFramework/JobDbContext.cs +++ b/API/TaskManager.EntityFramework/JobDbContext.cs @@ -203,6 +203,11 @@ namespace TaskManager.EntityFramework public DbSet TaskLogs { get; set; } + + public DbSet TaskSub { get; set; } + + + public DbSet TaskConifgure { get; set; } //public DbSet TaskConifgures { get; set; } diff --git a/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.Designer.cs b/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.Designer.cs new file mode 100644 index 0000000..8545888 --- /dev/null +++ b/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.Designer.cs @@ -0,0 +1,4487 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using TaskManager.EntityFramework; + +#nullable disable + +namespace TaskManager.EntityFramework.Migrations +{ + [DbContext(typeof(JobDbContext))] + [Migration("20250529092933_z202505290001")] + partial class z202505290001 + { + /// + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "8.0.0") + .HasAnnotation("Relational:MaxIdentifierLength", 128); + + SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_CON_DATE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("FeedbackResults") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("Measures") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("QuantityMeet1") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet10") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet11") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet12") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet13") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet14") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet15") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet16") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet17") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet18") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet19") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet2") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet20") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet21") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet22") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet23") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet24") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet25") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet26") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet27") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet28") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet29") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet3") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet30") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet31") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet4") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet5") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet6") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet7") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet8") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet9") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ReleaseEdition") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StartDate") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VentureSpecific") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("VentureType") + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_CON_DATE", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_CON_MMRP", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("FeedbackResults") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("Measures") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("QuantityMeet1") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet10") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet11") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet12") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet2") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet3") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet4") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet5") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet6") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet7") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet8") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityMeet9") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("ReleaseEdition") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StartMonth") + .IsRequired() + .HasMaxLength(7) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VentureSpecific") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("VentureType") + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_CON_MMRP", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_CON_PO", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("FeedbackResults") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("Measures") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("PurchaseOrder") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("QuantityMeet") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SerialNumber") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VentureSpecific") + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("VentureType") + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_CON_PO", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_ATTACHMENT_DATA", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("DeviceId") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("FileName") + .IsRequired() + .HasMaxLength(300) + .HasColumnType("VARCHAR"); + + b.Property("FileUrl") + .IsRequired() + .HasMaxLength(1000) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductSn") + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_ATTACHMENT_DATA", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_ENVIRONMENT", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("ChineseUnit") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CollectTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataCollectionPoint") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("EnvIndicatorName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("EquipmentCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("EquipmentName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("LowerLimit") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("NumValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpperLimit") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_ENVIRONMENT", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_FLAW", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ClassOfName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DefectsCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DefectsDesc") + .IsRequired() + .HasMaxLength(255) + .HasColumnType("VARCHAR"); + + b.Property("DefectsLevel") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("DefectsName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Numberofdefect") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StatisticalTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductBatch") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_FLAW", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_MATERIAL_DATA", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("Launched") + .HasMaxLength(6) + .HasColumnType("VARCHAR"); + + b.Property("MpnCode") + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("MpnName") + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("OemHardwareRevision") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("OemModel") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("OemProjectName") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("OemSoftwareRevision") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProcurementType") + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasPrecision(1) + .HasColumnType("DECIMAL"); + + b.Property("ValidDays") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("CHAR"); + + b.Property("VendorHardwareRevision") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_MATERIAL_DATA", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceName") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("Rate") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("RateTagValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StatisticalTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_OEE_ACHIEVEMENT_RATE", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_OEE_TIME_DETAILS", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DeviceId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(33) + .HasColumnType("VARCHAR"); + + b.Property("EndTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("RecId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StartTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubType") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubTypeName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_OEE_TIME_DETAILS", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_PROCESS", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("MaxProcessingCapacity") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("MoldCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("MoldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProcessCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProcessName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProcessOrder") + .HasPrecision(16) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("Rhythm") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("RhythmUnit") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TechCode") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TechName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TechVersion") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("ValidPeriod") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_PROCESS", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.Entitys.SUPPLIER_PRO_PROCESS_EQUIPMENT", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CalibrationDate") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CalibrationDueDays") + .IsRequired() + .HasMaxLength(12) + .HasColumnType("CHAR"); + + b.Property("CavityCount") + .HasPrecision(16) + .HasColumnType("DECIMAL"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CoolingChannelLayout") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("CurrentLocation") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CurrentUsageCount") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("DesignLifeUnits") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("DesignLifeValue") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("DetectionAccuracy") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("DetectionRange") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("DeviceStatus") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("DeviceType") + .HasPrecision(1) + .HasColumnType("DECIMAL"); + + b.Property("Manufacturer") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("Material") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ModelNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("MoldSize") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("OverhaulCount") + .HasPrecision(16) + .HasColumnType("DECIMAL"); + + b.Property("ProductionDate") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("CHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SerialNumber") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("ToleranceRange") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("UnitType") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WearThreshold") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_PROCESS_EQUIPMENT", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_BOM", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("BomCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("BomName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("BomVersion") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataUpdateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("MaterialUnit") + .HasMaxLength(8) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SubMaterialCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubMaterialName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SubMaterialQuota") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("SubMaterialType") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("SubMaterialUnit") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductType") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_BOM", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_DEL_STATE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataCreateTime") + .HasColumnType("datetime2"); + + b.Property("DeliveryNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDelivery") + .HasColumnType("int"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("ReceivingCrossings") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("RoadReceiveTime") + .HasColumnType("datetime2"); + + b.Property("RoadShippedTime") + .HasColumnType("datetime2"); + + b.Property("SerialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SerialSrate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SupplierReceiveTime") + .HasColumnType("datetime2"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_DEL_STATE"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_EMPLOYEE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheckInTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CheckOutTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataUpdateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("HaveQuantity") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("OperatorId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("OperatorName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("PositionId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("PositionName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("QualificationLevel") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_EMPLOYEE", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_INFO", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataUpdateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("KeyStation") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineOrder") + .HasPrecision(16) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StationOrder") + .HasPrecision(16) + .HasColumnType("DECIMAL"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_INFO", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_INV_DATA", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataUpdateTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityCurrent") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("StockState") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_INV_DATA"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_MRP_DATE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("IsUpdate") + .HasColumnType("nvarchar(max)"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDemand1") + .HasColumnType("int"); + + b.Property("QuantityDemand10") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand11") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand12") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand13") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand14") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand15") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand16") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand17") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand18") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand19") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand2") + .HasColumnType("int"); + + b.Property("QuantityDemand20") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand21") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand22") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand23") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand24") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand25") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand26") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand27") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand28") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand29") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand3") + .HasColumnType("int"); + + b.Property("QuantityDemand30") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand31") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand4") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand5") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand6") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand7") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand8") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand9") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("ReleaseEdition") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("StartDate") + .HasColumnType("datetime2"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_MRP_DATE"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_MRP_MONTH", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "createByUser"); + + b.Property("CreateTime") + .HasColumnType("datetime2") + .HasAnnotation("Relational:JsonPropertyName", "createTime"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int") + .HasAnnotation("Relational:JsonPropertyName", "isDelete"); + + b.Property("IsUpdate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "isUpdate"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "materialCode"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "materialDescription"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "plantId"); + + b.Property("PlantName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "plantName"); + + b.Property("QuantityDemand1") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand1"); + + b.Property("QuantityDemand10") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand10"); + + b.Property("QuantityDemand11") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand11"); + + b.Property("QuantityDemand12") + .HasColumnType("int") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand12"); + + b.Property("QuantityDemand2") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand2"); + + b.Property("QuantityDemand3") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand3"); + + b.Property("QuantityDemand4") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand4"); + + b.Property("QuantityDemand5") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand5"); + + b.Property("QuantityDemand6") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand6"); + + b.Property("QuantityDemand7") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand7"); + + b.Property("QuantityDemand8") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand8"); + + b.Property("QuantityDemand9") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantityDemand9"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("ReleaseEdition") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "releaseEdition"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("StartMonth") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "startMonth"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "updateByUser"); + + b.Property("UpdateTime") + .HasColumnType("datetime2") + .HasAnnotation("Relational:JsonPropertyName", "updateTime"); + + b.Property("Version") + .HasColumnType("int") + .HasAnnotation("Relational:JsonPropertyName", "version"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_MRP_MONTH"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_MRP_STATE", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("ConfirmTime") + .HasColumnType("datetime2"); + + b.Property("CreatQuantity") + .HasColumnType("decimal(18,2)"); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateRequired") + .HasColumnType("datetime2"); + + b.Property("DemandSrate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("DemandType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OnTimePercentage") + .HasColumnType("decimal(18,2)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDelivery") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityDemand") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityInTransit") + .HasColumnType("decimal(18,2)"); + + b.Property("QuantityReceive") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("SummaryCreatQuantity") + .HasColumnType("decimal(18,2)"); + + b.Property("SummaryQuantityDelivery") + .HasColumnType("decimal(18,2)"); + + b.Property("SummaryQuantityInTransit") + .HasColumnType("decimal(18,2)"); + + b.Property("SummaryQuantityReceive") + .HasColumnType("decimal(18,2)"); + + b.Property("SummarySign") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_MRP_STATE"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PO", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("Batch") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Country") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DeliveryDate") + .HasColumnType("datetime2"); + + b.Property("DeliveryPlace") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("ItemType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialUnit") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Note") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchaseOrder") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Purchaser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDelivery") + .HasColumnType("int"); + + b.Property("QuantityDemand") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("SerialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Supplier") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TradeTerms") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("VoucherDate") + .HasColumnType("datetime2"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PO"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_CPS", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CarrierCode") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Cc") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("Characteristic") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheckMode") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("CheckResult") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CollectTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DecimalValue") + .HasPrecision(26, 15) + .HasColumnType("DECIMAL"); + + b.Property("DetectionMode") + .HasMaxLength(20) + .HasColumnType("VARCHAR"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("EmpCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("EmpName") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("FttQty") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("GatherSpot") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("IntputQty") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("LimitUpdateTime") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("LowerLimit") + .HasPrecision(26, 15) + .HasColumnType("DECIMAL"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("Parameter") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SamplingRate") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("Sc") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("Spc") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("StandardValue") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UnitCn") + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("UnitEn") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("UpperLimit") + .HasPrecision(26, 15) + .HasColumnType("DECIMAL"); + + b.Property("VendorFieldCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorFieldDesc") + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorFieldName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductBatch") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_CPS", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_CSCHEDUL", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("AssemblyMaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ModelCategory") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Models") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MotorMaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OnLineDate") + .HasColumnType("datetime2"); + + b.Property("OnLineTime") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("Plant") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProductionLineId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProductionLineName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("SortDate") + .HasColumnType("datetime2"); + + b.Property("SortTime") + .HasMaxLength(8) + .HasColumnType("nvarchar(8)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_CSCHEDUL"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_DATA", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ChildHardwareRevision") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ChildPackageInfo") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ChildSoftwareRevision") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ChildSource") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("CollectTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("CHAR"); + + b.Property("EmpCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("EmpName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("FinalQualityStatus") + .IsRequired() + .HasMaxLength(8) + .HasColumnType("VARCHAR"); + + b.Property("InstrumentQualityStatus") + .HasMaxLength(8) + .HasColumnType("VARCHAR"); + + b.Property("ManualQualityStatus") + .HasMaxLength(8) + .HasColumnType("VARCHAR"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("MaterialInputTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("MaterialOutputTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("ParentHardwareRevision") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ParentSoftwareRevision") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SubBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubProdName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SubProdNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubProdNum") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("SubProdSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SubSupplierCode") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubSupplierName") + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorFieldName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorFieldNum") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductBatch") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductSn") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_DATA", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_FIRST_PASSYIELD", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("AcceptableNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("DefectiveNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("OncePassRateRealValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("OncePassRateTagValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("ProductionLineName") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StatisticalTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkOrderNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("WorkshopName") + .HasMaxLength(50) + .HasColumnType("nvarchar"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_FIRST_PASSYIELD", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_HSCHEDUL", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Models") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OnLineTime") + .HasColumnType("datetime2"); + + b.Property("ProductionLineId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProductionLineName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProductionType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_HSCHEDUL"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_MATERIAL_STOCK", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CheckNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CheckResult") + .IsRequired() + .HasMaxLength(2) + .HasColumnType("CHAR"); + + b.Property("CheckTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("ComponentCode") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ComponentName") + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DeadLine") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("DeviceCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("DeviceName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("EmpCode") + .IsRequired() + .HasMaxLength(16) + .HasColumnType("VARCHAR"); + + b.Property("EmpName") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("FeatureLower") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("FeatureName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("FeatureUnit") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("FeatureUpper") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("FeatureValue") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("LimitUpdateTime") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SamplingRate") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("StandardValue") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SubBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubBatchNum") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("SubBatchSn") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SubSupplierAddress") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SubSupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SubSupplierName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SupplierSubCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierSubName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorFieldCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("VendorFieldDesc") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_MATERIAL_STOCK", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_PLANING", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("Assembly") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "assembly"); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "createByUser"); + + b.Property("CreateTime") + .HasColumnType("datetime2") + .HasAnnotation("Relational:JsonPropertyName", "createTime"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)") + .HasAnnotation("Relational:JsonPropertyName", "id"); + + b.Property("IsDelete") + .HasColumnType("int") + .HasAnnotation("Relational:JsonPropertyName", "isDelete"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "materialCode"); + + b.Property("Models") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "models"); + + b.Property("Omterior") + .HasColumnType("nvarchar(max)"); + + b.Property("Pattern") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "pattern"); + + b.Property("Plant") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "plant"); + + b.Property("Quantity1") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity1"); + + b.Property("Quantity2") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity2"); + + b.Property("Quantity3") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity3"); + + b.Property("Quantity4") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity4"); + + b.Property("Quantity5") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity5"); + + b.Property("Quantity6") + .HasColumnType("decimal(18,2)") + .HasAnnotation("Relational:JsonPropertyName", "quantity6"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("ReleaseEdition") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "releaseEdition"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("SalseDepartment") + .HasColumnType("nvarchar(max)"); + + b.Property("StartMonth") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "startMonth"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("Type") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "type"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)") + .HasAnnotation("Relational:JsonPropertyName", "updateByUser"); + + b.Property("UpdateTime") + .HasColumnType("datetime2") + .HasAnnotation("Relational:JsonPropertyName", "updateTime"); + + b.Property("Version") + .HasColumnType("int") + .HasAnnotation("Relational:JsonPropertyName", "version"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_PLANING"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_SCHEDULING", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("ActualBeginTime") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("ActualEndTime") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("ManufactureInputNum") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ManufactureNum") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ManufactureOutputNum") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("PlanBeginTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("PlanEndTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("PlanNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlanStatus") + .IsRequired() + .HasMaxLength(1) + .HasColumnType("CHAR"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_SCHEDULING", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_STATION_FIRST_PASSYIELD", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("AcceptableNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("CheryProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("CheryProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("DefectiveNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ManufactureNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("OncePassRateRealValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("OncePassRateTagValue") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("PlantId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("PlantName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("ProductBatchNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("ProductionLineName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("StationId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("StationName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("StatisticalTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("VendorProductName") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("VendorProductNo") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkOrderNumber") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("WorkShift") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopId") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("WorkshopName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_STATION_FIRST_PASSYIELD", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_PRO_TSCHEDUL", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("FinalOnLineTime") + .HasColumnType("datetime2"); + + b.Property("FinalWorkshop") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Models") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("OnLineTime") + .HasColumnType("datetime2"); + + b.Property("ProductionLineId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ProductionLineName") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("Vin") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_PRO_TSCHEDUL"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_RETURN", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DemandPickupTime") + .HasColumnType("datetime2"); + + b.Property("Feedback") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("Judge") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("LotNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PickUpCrossings") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PickUpLocation") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("Plant") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDelivery") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("ReturnNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReturnReason") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("ReturnType") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SerialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SerialSrate") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_RETURN"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_SA_WEEK", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("CreateTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DateReceived") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("IsDelete") + .HasColumnType("int"); + + b.Property("MaterialCode") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("MaterialDescription") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PlantId") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("PurchasingGroup") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("QuantityDemand") + .HasColumnType("decimal(18,2)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("ScheduleAgreement") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("SerialNumber") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("UpdateByUser") + .HasMaxLength(50) + .HasColumnType("nvarchar(50)"); + + b.Property("UpdateTime") + .HasMaxLength(50) + .HasColumnType("datetime2"); + + b.Property("Version") + .HasColumnType("int"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_SA_WEEK"); + }); + + modelBuilder.Entity("TaskManager.Entity.SUPPLIER_SINV_DATA", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("DataUpdateTime") + .IsRequired() + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("Id") + .HasColumnType("nvarchar(max)"); + + b.Property("InventoryStatus") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("MaterialCode") + .IsRequired() + .HasMaxLength(50) + .HasColumnType("VARCHAR"); + + b.Property("MaterialDescription") + .IsRequired() + .HasMaxLength(100) + .HasColumnType("VARCHAR"); + + b.Property("MaterialType") + .IsRequired() + .HasMaxLength(20) + .HasColumnType("VARCHAR"); + + b.Property("ProductionCycle") + .IsRequired() + .HasMaxLength(10) + .HasColumnType("VARCHAR"); + + b.Property("QuantityCurrent") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("QuantityPlan") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("ReadState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.Property("Remark") + .HasMaxLength(500) + .HasColumnType("NVarchar"); + + b.Property("RequestDate") + .HasColumnType("nvarchar(max)"); + + b.Property("SafetyStock") + .HasPrecision(16, 5) + .HasColumnType("DECIMAL"); + + b.Property("SupplierBatch") + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SupplierCode") + .IsRequired() + .HasMaxLength(32) + .HasColumnType("VARCHAR"); + + b.Property("SupplierName") + .IsRequired() + .HasMaxLength(64) + .HasColumnType("VARCHAR"); + + b.Property("SupplieryxqDate") + .HasMaxLength(19) + .HasColumnType("CHAR"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("WriteState") + .ValueGeneratedOnAdd() + .HasColumnType("bit") + .HasDefaultValue(false); + + b.HasKey("UId"); + + b.ToTable("SUPPLIER_SINV_DATA", (string)null); + }); + + modelBuilder.Entity("TaskManager.Entity.TaskConifgure", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("Api") + .HasColumnType("nvarchar(max)"); + + b.Property("Corn") + .HasColumnType("nvarchar(max)"); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("IsAuto") + .HasColumnType("bit"); + + b.Property("Module") + .HasColumnType("nvarchar(max)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TableName") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskName") + .HasColumnType("nvarchar(max)"); + + b.Property("Url") + .HasColumnType("nvarchar(max)"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("TaskConifgure"); + }); + + modelBuilder.Entity("TaskManager.Entity.TaskLog", b => + { + b.Property("UId") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); + + b.Property("CreationTime") + .HasColumnType("datetime2"); + + b.Property("Info") + .HasColumnType("nvarchar(max)"); + + b.Property("ReadState") + .HasColumnType("bit"); + + b.Property("Remark") + .HasColumnType("nvarchar(max)"); + + b.Property("TaskId") + .HasColumnType("uniqueidentifier"); + + b.Property("TaskName") + .HasColumnType("nvarchar(max)"); + + b.Property("Type") + .HasColumnType("nvarchar(max)"); + + b.Property("WriteState") + .HasColumnType("bit"); + + b.HasKey("UId"); + + b.ToTable("TaskLogs"); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.cs b/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.cs new file mode 100644 index 0000000..2bf11b0 --- /dev/null +++ b/API/TaskManager.EntityFramework/Migrations/20250529092933_z202505290001.cs @@ -0,0 +1,3448 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +#nullable disable + +namespace TaskManager.EntityFramework.Migrations +{ + /// + public partial class z202505290001 : Migration + { + /// + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Type", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "TaskName", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Info", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Url", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "TaskName", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "TableName", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Module", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Corn", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Api", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_SINV_DATA", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ScheduleAgreement", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "PurchasingGroup", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialSrate", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ReturnType", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ReturnReason", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ReturnNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_RETURN", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_RETURN", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PickUpLocation", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PickUpCrossings", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "LotNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Judge", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Feedback", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "FinalWorkshop", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD", + type: "NVarchar(500)", + maxLength: 500, + nullable: true, + oldClrType: typeof(string), + oldType: "NVarchar(500)", + oldMaxLength: 500); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Type", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "StartMonth", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SalseDepartment", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Pattern", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Omterior", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Assembly", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ProductionType", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SortTime", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(8)", + oldMaxLength: 8); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "OnLineTime", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(8)", + maxLength: 8, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(8)", + oldMaxLength: 8); + + migrationBuilder.AlterColumn( + name: "MotorMaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ModelCategory", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "AssemblyMaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "TradeTerms", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Supplier", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PO", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PO", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Purchaser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PurchaseOrder", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Note", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialUnit", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "ItemType", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "DeliveryPlace", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Country", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "Batch", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SummarySign", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "DemandType", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "DemandSrate", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "StartMonth", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "IsUpdate", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "IsUpdate", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "StockState", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialSrate", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(max)", + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(max)"); + + migrationBuilder.AlterColumn( + name: "ReceivingCrossings", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "DeliveryNumber", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: true, + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50); + } + + /// + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.AlterColumn( + name: "Type", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TaskName", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Info", + table: "TaskLogs", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Url", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TaskName", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TableName", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Module", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Corn", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Api", + table: "TaskConifgure", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_SINV_DATA", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ScheduleAgreement", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PurchasingGroup", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_SA_WEEK", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialSrate", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReturnType", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReturnReason", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReturnNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_RETURN", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_RETURN", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PickUpLocation", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PickUpCrossings", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "LotNumber", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Judge", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Feedback", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_RETURN", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "FinalWorkshop", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_TSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_STATION_FIRST_PASSYIELD", + type: "NVarchar(500)", + maxLength: 500, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "NVarchar(500)", + oldMaxLength: 500, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Type", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StartMonth", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SalseDepartment", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Pattern", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Omterior", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Assembly", + table: "SUPPLIER_PRO_PLANING", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionType", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_HSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Vin", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SortTime", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(8)", + maxLength: 8, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineName", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ProductionLineId", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Plant", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "OnLineTime", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(8)", + maxLength: 8, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(8)", + oldMaxLength: 8, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MotorMaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Models", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ModelCategory", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "AssemblyMaterialCode", + table: "SUPPLIER_PRO_CSCHEDUL", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "TradeTerms", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Supplier", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_PO", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_PO", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Purchaser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PurchaseOrder", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Note", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialUnit", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ItemType", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeliveryPlace", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Country", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Batch", + table: "SUPPLIER_PO", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SummarySign", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DemandType", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DemandSrate", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StartMonth", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IsUpdate", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_MONTH", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReleaseEdition", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "IsUpdate", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_MRP_DATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "StockState", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantName", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_INV_DATA", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "UpdateByUser", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialSrate", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "SerialNumber", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "RequestDate", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "Remark", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(max)", + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(max)", + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "ReceivingCrossings", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "PlantId", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialDescription", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "MaterialCode", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "DeliveryNumber", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + + migrationBuilder.AlterColumn( + name: "CreateByUser", + table: "SUPPLIER_DEL_STATE", + type: "nvarchar(50)", + maxLength: 50, + nullable: false, + defaultValue: "", + oldClrType: typeof(string), + oldType: "nvarchar(50)", + oldMaxLength: 50, + oldNullable: true); + } + } +} diff --git a/API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs b/API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs index 6d97a8d..ada889a 100644 --- a/API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs +++ b/API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs @@ -1626,7 +1626,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -1640,7 +1639,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("DeliveryNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -1651,17 +1649,14 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -1672,16 +1667,13 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("ReceivingCrossings") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RoadReceiveTime") @@ -1691,12 +1683,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("SerialNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SerialSrate") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -1707,7 +1697,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -1983,7 +1972,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2003,22 +1991,18 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2029,15 +2013,12 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("StockState") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2045,7 +2026,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2072,7 +2052,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2089,26 +2068,21 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("IsUpdate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2209,16 +2183,13 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("ReleaseEdition") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("StartDate") @@ -2228,7 +2199,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2255,7 +2225,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "createByUser"); @@ -2275,31 +2244,26 @@ namespace TaskManager.EntityFramework.Migrations .HasAnnotation("Relational:JsonPropertyName", "isDelete"); b.Property("IsUpdate") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "isUpdate"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "materialCode"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "materialDescription"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "plantId"); b.Property("PlantName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "plantName"); @@ -2356,21 +2320,17 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("ReleaseEdition") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "releaseEdition"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("StartMonth") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "startMonth"); @@ -2379,7 +2339,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "updateByUser"); @@ -2415,7 +2374,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("decimal(18,2)"); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2429,12 +2387,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("DemandSrate") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("DemandType") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2445,12 +2401,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2458,12 +2412,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("decimal(18,2)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2483,11 +2435,9 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SummaryCreatQuantity") @@ -2503,7 +2453,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("decimal(18,2)"); b.Property("SummarySign") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2511,7 +2460,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2538,17 +2486,14 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("Batch") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Country") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2562,7 +2507,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("DeliveryPlace") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2573,47 +2517,38 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("ItemType") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialUnit") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Note") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PurchaseOrder") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Purchaser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2627,20 +2562,16 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SerialNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Supplier") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2648,12 +2579,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("TradeTerms") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2944,12 +2873,10 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("AssemblyMaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2966,27 +2893,22 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ModelCategory") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Models") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MotorMaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -2994,22 +2916,18 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("OnLineTime") - .IsRequired() .HasMaxLength(8) .HasColumnType("nvarchar(8)"); b.Property("Plant") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ProductionLineId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ProductionLineName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3017,18 +2935,15 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SortDate") .HasColumnType("datetime2"); b.Property("SortTime") - .IsRequired() .HasMaxLength(8) .HasColumnType("nvarchar(8)"); @@ -3036,7 +2951,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3047,7 +2961,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("Vin") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3444,7 +3357,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3461,17 +3373,14 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Models") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3479,17 +3388,14 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("ProductionLineId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ProductionLineName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ProductionType") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3497,18 +3403,15 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3519,7 +3422,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("Vin") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -3716,13 +3618,11 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("Assembly") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "assembly"); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "createByUser"); @@ -3743,29 +3643,24 @@ namespace TaskManager.EntityFramework.Migrations .HasAnnotation("Relational:JsonPropertyName", "isDelete"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "materialCode"); b.Property("Models") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "models"); b.Property("Omterior") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Pattern") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "pattern"); b.Property("Plant") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "plant"); @@ -3798,25 +3693,20 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("ReleaseEdition") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "releaseEdition"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SalseDepartment") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("StartMonth") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "startMonth"); @@ -3825,13 +3715,11 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("Type") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "type"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)") .HasAnnotation("Relational:JsonPropertyName", "updateByUser"); @@ -4051,7 +3939,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasMaxLength(500) .HasColumnType("NVarchar"); @@ -4129,7 +4016,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4143,7 +4029,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("FinalWorkshop") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4154,17 +4039,14 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Models") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4172,12 +4054,10 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("ProductionLineId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ProductionLineName") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4185,18 +4065,15 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4207,7 +4084,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("Vin") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4228,7 +4104,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4242,7 +4117,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("Feedback") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4253,37 +4127,30 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("Judge") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("LotNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PickUpCrossings") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PickUpLocation") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("Plant") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4294,35 +4161,28 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ReturnNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ReturnReason") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("ReturnType") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SerialNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SerialSrate") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4330,7 +4190,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4357,7 +4216,6 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("CreateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4379,22 +4237,18 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("int"); b.Property("MaterialCode") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("MaterialDescription") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PlantId") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("PurchasingGroup") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4405,20 +4259,16 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ScheduleAgreement") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); b.Property("SerialNumber") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4426,7 +4276,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("uniqueidentifier"); b.Property("UpdateByUser") - .IsRequired() .HasMaxLength(50) .HasColumnType("nvarchar(50)"); @@ -4507,7 +4356,6 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("NVarchar"); b.Property("RequestDate") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("SafetyStock") @@ -4554,11 +4402,9 @@ namespace TaskManager.EntityFramework.Migrations SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("UId")); b.Property("Api") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Corn") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("CreationTime") @@ -4568,29 +4414,24 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("bit"); b.Property("Module") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ReadState") .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TableName") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); b.Property("TaskName") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Url") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("WriteState") @@ -4613,25 +4454,21 @@ namespace TaskManager.EntityFramework.Migrations .HasColumnType("datetime2"); b.Property("Info") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("ReadState") .HasColumnType("bit"); b.Property("Remark") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("TaskId") .HasColumnType("uniqueidentifier"); b.Property("TaskName") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("Type") - .IsRequired() .HasColumnType("nvarchar(max)"); b.Property("WriteState") diff --git a/API/TaskManager.EntityFramework/TaskManager.EntityFramework.csproj b/API/TaskManager.EntityFramework/TaskManager.EntityFramework.csproj index 00e9783..3236ca0 100644 --- a/API/TaskManager.EntityFramework/TaskManager.EntityFramework.csproj +++ b/API/TaskManager.EntityFramework/TaskManager.EntityFramework.csproj @@ -7,6 +7,7 @@ + all diff --git a/API/Wood.Admin.WebApi/Startup.cs b/API/Wood.Admin.WebApi/Startup.cs index 4d4e5bd..6fd6654 100644 --- a/API/Wood.Admin.WebApi/Startup.cs +++ b/API/Wood.Admin.WebApi/Startup.cs @@ -21,6 +21,7 @@ using System.Reflection; using System.Text; using System.Threading.Tasks; using TaskManager.Controllers; +using TaskManager.Entity; using TaskManager.EntityFramework; using TaskManager.EntityFramework.Repository; @@ -117,13 +118,95 @@ namespace Wood.Admin.WebApi // 13. 供应商共享库存相关 services.AddScoped(); - // 14. 风险确认相关服务(如果类型名正确) - + + //services.AddTransient(implementationFactory => + //{ + // Func accesor = key => + // { + // if (key.Equals(typeof(JisBBACSeEdiCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(JisHBPOSeEdiCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(JisBBACSaSeEdiCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(JisHBPOSaSeEdiCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(MaiDanBBACSaSeCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(MaiDanHBPOSaSeCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(PubSaSeCompareExportService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(PendingDeductionService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(PendingDeductionDelService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(GenerateJisInvoiceService).FullName)) + // { + // return implementationFactory.GetService(); + // } + + // if (key.Equals(typeof(BalanceSumService).FullName)) + // { + // return implementationFactory.GetService(); + // } + + // if (key.Equals(typeof(EdiWmsDiffService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(HBPOEdiWmsDiffService).FullName)) + // { + // return implementationFactory.GetService(); + // } + + // if (key.Equals(typeof(PDMakeService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(MakeCanSettlementService).FullName)) + // { + // return implementationFactory.GetService(); + // } + // if (key.Equals(typeof(ReturnCanSettlement).FullName)) + // { + // return implementationFactory.GetService(); + // } + + + // else + // { + // throw new ArgumentException($"Not Support key:{key}"); + // } + // }; return accesor; + //}); + + + // 14. 风险确认相关服务(如果类型名正确) + // 配置 DbContext 使用 SQL Server 连接字符串 services.AddDbContext(options => options.UseSqlServer(GlobalContext.SystemConfig.CustomerDb)); diff --git a/API/Wood.Service/Controllers/NormalBaseController.cs b/API/Wood.Service/Controllers/NormalBaseController.cs index 31e11fc..ae91abe 100644 --- a/API/Wood.Service/Controllers/NormalBaseController.cs +++ b/API/Wood.Service/Controllers/NormalBaseController.cs @@ -1,6 +1,9 @@ -using Microsoft.AspNetCore.Authorization; +using Magicodes.ExporterAndImporter.Core; +using Magicodes.ExporterAndImporter.Excel; +using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; using System.Linq; @@ -107,6 +110,72 @@ namespace Wood.Service.Controllers var pagedResult = await _repository.GetPagedAsync(filter, pagingParams); return Ok(pagedResult); } - + public async Task Export([FromQuery] int pageNumber = 1, + [FromQuery] int pageSize = 10, + [FromQuery] string sortBy = "", + [FromQuery] bool isAscending = true, + [FromQuery] Dictionary filters = null) + { + var pagingParams = new PagingParams + { + PageNumber = pageNumber, + PageSize = pageSize, + SortBy = sortBy, + IsAscending = isAscending, + Filters = filters + }; + + // 可以在这里构建表达式树过滤条件 + Expression> filter = null; + + var pagedResult = await _repository.GetPagedAsync(null, pagingParams); + return await ExportFile(pagedResult.Data as ICollection, Guid.NewGuid().ToString() + ".xlsx"); + + + } + protected async Task ExportFile(ICollection dtos, string fileName) + { + var excelExporter = HttpContext.RequestServices.GetRequiredService(); + var res = await excelExporter.ExportAsByteArray(dtos); + return new FileStreamResult(new MemoryStream(res), "application/octet-stream") { FileDownloadName = DateTime.Now.ToString("yyyyMMddHHmm") + "_" + fileName }; + } + + + [HttpGet] + public async Task GetImportTemplate() + { + try + { + // 创建导入模板生成器 + var importer = new ExcelImporter(); + + // 生成导入模板流(这里假设使用 YourModel 作为导入模型) + using var stream = new MemoryStream(); + await importer.GenerateTemplate(stream, typeof(T)); + stream.Seek(0, SeekOrigin.Begin); + + // 设置友好的文件名,例如:"导入模板_20250530.xlsx" + var fileName = $"导入模板_{DateTime.Now:yyyyMMdd}.xlsx"; + + // 返回文件流结果 + return File( + fileStream: stream, + contentType: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + fileDownloadName: fileName); + } + catch (Exception ex) + { + // 记录异常日志 + Console.WriteLine($"生成导入模板时出错: {ex.Message}"); + + // 返回错误响应 + return StatusCode(500, "生成导入模板时发生错误"); + } + } + + + + + } } diff --git a/API/Wood.Service/Controllers/RecurringJobBaseController.cs b/API/Wood.Service/Controllers/RecurringJobBaseController.cs index 0aeb0d4..9a36dc7 100644 --- a/API/Wood.Service/Controllers/RecurringJobBaseController.cs +++ b/API/Wood.Service/Controllers/RecurringJobBaseController.cs @@ -16,7 +16,6 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using TaskManager.Entity; using TaskManager.EntityFramework; -using TaskManager.EntityFramework; @@ -30,6 +29,7 @@ namespace TaskManager.Controllers protected string appSecret = "48edc4425647425d87f806a1ba492580"; protected readonly HttpClient _httpClient; protected readonly JobDbContext _jobDbContext; + protected string Client { set; get; } = "Wood"; protected string Path { set; get; } = "/v2/get/supplierProPlaning"; protected string Url { set; get; } = "/v2/get/supplierProPlaning"; protected virtual string TaskName { set; get; } = "SupplierProPlaning"; @@ -135,17 +135,17 @@ namespace TaskManager.Controllers await _logger.AddInfo($"{TaskName}结束执行作业{uid}", TaskName); } [NonAction] - public async Task ExecuteAsync(string url, string path, string taskName) + public async Task ExecuteAsync(string url, string path, string taskName,string client) { var str = DateTime.Now.ToLongTimeString(); await BeforeExecuteAsync(str); - await DoExecutingAsync(url, path, taskName); + await DoExecutingAsync(url, path, taskName,client); await AfterExecuteAsync(str); } - protected async virtual Task DoExecutingAsync(string url, string path, string takName) + protected async virtual Task DoExecutingAsync(string url, string path, string takName,string client) { diff --git a/API/Wood.Service/Controllers/RecurringJobInputPageController.cs b/API/Wood.Service/Controllers/RecurringJobInputPageController.cs index bf2ccc2..6ae7e06 100644 --- a/API/Wood.Service/Controllers/RecurringJobInputPageController.cs +++ b/API/Wood.Service/Controllers/RecurringJobInputPageController.cs @@ -1,6 +1,183 @@ -namespace TaskManager.Controllers +using Dapper; +using Microsoft.EntityFrameworkCore; +using System.Drawing.Printing; +using TaskManager.Contracts.Dtos; +using TaskManager.Entity; +using TaskManager.EntityFramework; + +namespace TaskManager.Controllers { - //public class RecurringJobInputPageController: RecurringJobBaseController + public class RecurringJobInputPageController : RecurringJobBaseController + { + + public RecurringJobInputPageController(HttpClient httpClient, JobDbContext jobDbContext, LogController log) : base(httpClient, jobDbContext, log) + { + + } + + public async Task ProcessUnsyncedTasks() + { + // 查询主表中未完成且子表存在的任务 + + } + + private async Task SyncTaskSubTable(TaskSub master) + { + var page = master.SyncedPageCount + 1; // 下一页 + var sublist=_jobDbContext.TaskSub.Where(p => p.TaskName == master.TaskName && p.WriteState == false).ToList(); + int pageSize = 1000; + + if (!sublist.Any()) + { + foreach (var sub in sublist) + { + string str = $"select * from {sub.TableName} where TaskId={sub.TaskId} and WriteState=false order by uid"; + var entites=_jobDbContext.Database.GetDbConnection().Query(str); + var subTableQuery=entites.Skip((page - 1) * pageSize) + .Take(page).ToList(); + + + + + + + + } + } + + + + + Type subTableType = GetSubTableType(master.SubTableName); + if (subTableType == null) return; + + // 分页查询子表未同步记录 + var subTableQuery = _dbContext.Set(subTableType) + .Where($"TaskId == {master.TaskId} AND IsSynced == false") + .OrderBy("Id") // 假设子表有排序字段 + .Skip((page - 1) * PageSize) + .Take(PageSize); + + var records = await subTableQuery.ToListAsync(); + if (!records.Any()) + { + // 所有子表记录已同步,标记主表完成 + master.IsSynced = true; + _dbContext.Update(master); + await _dbContext.SaveChangesAsync(); + return; + } + + // 标记子表记录为已同步 + foreach (dynamic record in records) + { + record.IsSynced = true; + _dbContext.Update(record); + } + + // 更新主表分页数 + master.SyncedPageCount = page; + _dbContext.Update(master); + await _dbContext.SaveChangesAsync(); + + + + + + + + + + + + + + } + private Type GetSubTableType(string subTableName) + { + // 示例:通过子表名映射实体类型(实际需根据业务逻辑实现) + var typeMap = new Dictionary + { + {"TaskSubTable1", typeof(TaskSubTable1)}, + {"TaskSubTable2", typeof(TaskSubTable2)} + }; + return typeMap.TryGetValue(subTableName, out var type) ? type : null; + } + } + + //public class TaskSyncService //{ + // private readonly DbContext _dbContext; + // private const int PageSize = 100; // 每页读取数量 + + // public TaskSyncService(DbContext dbContext) + // { + // _dbContext = dbContext; + // } + + // public async Task ProcessUnsyncedTasks() + // { + // // 查询主表中未完成且子表存在的任务 + // var masters = await _dbContext.Set() + // .Where(m => !m.IsSynced && !string.IsNullOrEmpty(m.SubTableName)) + // .ToListAsync(); + + // foreach (var master in masters) + // { + // await SyncTaskSubTable(master); + // } + // } + + // private async Task SyncTaskSubTable(TaskMaster master) + // { + // var page = master.SyncedPageCount + 1; // 下一页 + + // // 动态获取子表类型(需根据实际场景实现,如通过字典映射子表名到实体类型) + // Type subTableType = GetSubTableType(master.SubTableName); + // if (subTableType == null) return; + + // // 分页查询子表未同步记录 + // var subTableQuery = _dbContext.Set(subTableType) + // .Where($"TaskId == {master.TaskId} AND IsSynced == false") + // .OrderBy("Id") // 假设子表有排序字段 + // .Skip((page - 1) * PageSize) + // .Take(PageSize); + + // var records = await subTableQuery.ToListAsync(); + // if (!records.Any()) + // { + // // 所有子表记录已同步,标记主表完成 + // master.IsSynced = true; + // _dbContext.Update(master); + // await _dbContext.SaveChangesAsync(); + // return; + // } + + // // 标记子表记录为已同步 + // foreach (dynamic record in records) + // { + // record.IsSynced = true; + // _dbContext.Update(record); + // } + + // // 更新主表分页数 + // master.SyncedPageCount = page; + // _dbContext.Update(master); + // await _dbContext.SaveChangesAsync(); + // } + + // private Type GetSubTableType(string subTableName) + // { + // // 示例:通过子表名映射实体类型(实际需根据业务逻辑实现) + // var typeMap = new Dictionary + // { + // {"TaskSubTable1", typeof(TaskSubTable1)}, + // {"TaskSubTable2", typeof(TaskSubTable2)} + // }; + // return typeMap.TryGetValue(subTableName, out var type) ? type : null; + // } //} + + + } diff --git a/API/Wood.Service/Controllers/RecurringJobOutPageController.cs b/API/Wood.Service/Controllers/RecurringJobOutPageController.cs index 57c6609..3ce39ef 100644 --- a/API/Wood.Service/Controllers/RecurringJobOutPageController.cs +++ b/API/Wood.Service/Controllers/RecurringJobOutPageController.cs @@ -20,8 +20,6 @@ namespace TaskManager.Controllers //[Route("api/[controller]")] public class RecurringJobOutPageController : RecurringJobBaseController where T : CherryReadBaseEntity, new() where ToutputDetial : CherryReadBaseEntityDto { - - protected readonly IRepository _repository; public RecurringJobOutPageController(HttpClient httpClient, JobDbContext jobDbContext, LogController log,IRepository repository) : base(httpClient, jobDbContext, log) { @@ -49,22 +47,12 @@ namespace TaskManager.Controllers IsAscending = isAscending, Filters = filters }; - // 可以在这里构建表达式树过滤条件 Expression> filter = null; - var pagedResult = await _repository.GetPagedAsync(filter, pagingParams); return await ExportFile(pagedResult.Data, Guid.NewGuid().ToString() + ".xlsx"); - - } - - - - - - [NonAction] public async Task> FetchAllDataAsync(string inputdate) { @@ -74,125 +62,196 @@ namespace TaskManager.Controllers int currentPage = 1; string date = !string.IsNullOrEmpty(inputdate) ? inputdate : DateTime.Now.ToString("yyyy-MM-dd"); - - // 首次请求获取总条数和分页信息 - PagedResponse firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, IsForce = true }); - - - - if (firstResponse == null || firstResponse.Code != 200) - { - await _logger.AddError("首次请求失败,无法获取分页信息。", TaskName); - return allData; - } - if (firstResponse.Data.Total == "0") - { - await _logger.AddError("首次请求失败,Total为0是否已经全部读取过。", TaskName); - return allData; - - } - var readedcount = _jobDbContext.Set().Where(p => p.RequestDate == inputdate).Count(); - if (readedcount != int.Parse(firstResponse.Data.Total))//记录数不相等 + if (readedcount == 0)//第一次请求用false,接口人胡启名要求 { - var ids = _jobDbContext.Set().Where(p => p.RequestDate == inputdate).Select(p => p.Id).ToList();//已经同步的ID - totalItems = int.Parse(firstResponse.Data.Total); - pageSize = int.Parse(firstResponse.Data.PageSize); - List pagefirstList = new List(); - if (readedcount > 0) + PagedResponse firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, IsForce = false }); + if (firstResponse == null || firstResponse.Code != 200) { - var listrows = firstResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); - foreach (var itm in firstResponse.Data.Rows) - { - T entity = new T(); - entity.InjectFrom(itm); - entity.CreationTime = DateTime.Now; - pagefirstList.Add(entity); - allData.Add(itm); - } + await _logger.AddError("首次请求失败,无法获取分页信息。", TaskName); + return allData; } - else + if (readedcount != int.Parse(firstResponse.Data.Total))//记录数不相等 { - - foreach (var itm in firstResponse.Data.Rows) + var ids = _jobDbContext.Set().Where(p => p.RequestDate == inputdate).Select(p => p.Id).ToList();//已经同步的ID + totalItems = int.Parse(firstResponse.Data.Total); + pageSize = int.Parse(firstResponse.Data.PageSize); + List pagefirstList = new List(); + if (readedcount > 0) { - T entity = new T(); - entity.InjectFrom(itm); - entity.CreationTime = DateTime.Now; - pagefirstList.Add(entity); - allData.Add(itm); + var listrows = firstResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); + foreach (var itm in firstResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pagefirstList.Add(entity); + allData.Add(itm); + } } - } - - _jobDbContext.BulkInsert(pagefirstList); - - //Console.WriteLine($"总记录数: {totalItems}, 每页大小: {pageSize}"); - - // 计算总页数 - int totalPages = (int)Math.Ceiling((double)totalItems / pageSize); - //Console.WriteLine($"总共需要请求 {totalPages} 页数据"); - - // 循环请求剩余页面 - for (currentPage = 2; currentPage <= totalPages; currentPage++) - { - PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, IsForce = true }; - Console.WriteLine($"正在请求第 {currentPage} 页..."); - PagedResponse pageResponse = await GetPageAsync(pageinput); - if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0) + else + { + foreach (var itm in firstResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pagefirstList.Add(entity); + allData.Add(itm); + } + } + _jobDbContext.BulkInsert(pagefirstList); + //Console.WriteLine($"总记录数: {totalItems}, 每页大小: {pageSize}"); + // 计算总页数 + int totalPages = (int)Math.Ceiling((double)totalItems / pageSize); + //Console.WriteLine($"总共需要请求 {totalPages} 页数据"); + // 循环请求剩余页面 + for (currentPage = 2; currentPage <= totalPages; currentPage++) { - List pageList = new List(); - //foreach (var itm in pageResponse.Data.Rows) - //{ - // T entity = new T(); - // entity.InjectFrom(itm); - // entity.CreationTime = DateTime.Now; - // pageList.Add(entity); - // allData.Add(itm); - //} - if (readedcount > 0) + PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, IsForce =false }; + Console.WriteLine($"正在请求第 {currentPage} 页..."); + PagedResponse pageResponse = await GetPageAsync(pageinput); + if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0) { - var listrows = pageResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); - foreach (var itm in pageResponse.Data.Rows) + List pageList = new List(); + if (readedcount > 0) { - T entity = new T(); - entity.InjectFrom(itm); - entity.CreationTime = DateTime.Now; - pageList.Add(entity); - allData.Add(itm); + var listrows = pageResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); + foreach (var itm in pageResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pageList.Add(entity); + allData.Add(itm); + } } + else + { + foreach (var itm in pageResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pageList.Add(entity); + allData.Add(itm); + } + } + _jobDbContext.BulkInsert(pageList); + await _logger.AddInfo($"成功获取 {pageResponse.Data.Rows.Count} 条记录", TaskName); } else { - - foreach (var itm in pageResponse.Data.Rows) - { - T entity = new T(); - entity.InjectFrom(itm); - entity.CreationTime = DateTime.Now; - pageList.Add(entity); - allData.Add(itm); - } + await _logger.AddError($"第 {currentPage} 页未返回数据", TaskName); } + // 简单的请求间隔,避免过于频繁 + await Task.Delay(200); + } + await _logger.AddInfo($"所有数据获取完成,总共获取了 {allData.Count} 条记录", TaskName); + } + } + else + { + PagedResponse firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, IsForce = true }); + if (firstResponse == null || firstResponse.Code != 200) + { + await _logger.AddError("首次请求失败,无法获取分页信息。", TaskName); + return allData; + } + if (firstResponse.Data.Total == "0") + { + await _logger.AddError("首次请求失败,Total为0是否已经全部读取过。", TaskName); + return allData; - - _jobDbContext.BulkInsert(pageList); - await _logger.AddInfo($"成功获取 {pageResponse.Data.Rows.Count} 条记录", TaskName); + } + if (readedcount != int.Parse(firstResponse.Data.Total))//记录数不相等 + { + var ids = _jobDbContext.Set().Where(p => p.RequestDate == inputdate).Select(p => p.Id).ToList();//已经同步的ID + totalItems = int.Parse(firstResponse.Data.Total); + pageSize = int.Parse(firstResponse.Data.PageSize); + List pagefirstList = new List(); + if (readedcount > 0) + { + var listrows = firstResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); + foreach (var itm in firstResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pagefirstList.Add(entity); + allData.Add(itm); + } } else { - await _logger.AddError($"第 {currentPage} 页未返回数据", TaskName); + foreach (var itm in firstResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pagefirstList.Add(entity); + allData.Add(itm); + } } + _jobDbContext.BulkInsert(pagefirstList); + //Console.WriteLine($"总记录数: {totalItems}, 每页大小: {pageSize}"); + // 计算总页数 + int totalPages = (int)Math.Ceiling((double)totalItems / pageSize); + //Console.WriteLine($"总共需要请求 {totalPages} 页数据"); + + // 循环请求剩余页面 + for (currentPage = 2; currentPage <= totalPages; currentPage++) + { + PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, IsForce = true }; + Console.WriteLine($"正在请求第 {currentPage} 页..."); + PagedResponse pageResponse = await GetPageAsync(pageinput); + if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0) + { + List pageList = new List(); + if (readedcount > 0) + { + var listrows = pageResponse.Data.Rows.Where(p => !ids.Contains(p.Id)); + foreach (var itm in pageResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pageList.Add(entity); + allData.Add(itm); + } + } + else + { - // 简单的请求间隔,避免过于频繁 - await Task.Delay(200); + foreach (var itm in pageResponse.Data.Rows) + { + T entity = new T(); + entity.InjectFrom(itm); + entity.CreationTime = DateTime.Now; + pageList.Add(entity); + allData.Add(itm); + } + } + _jobDbContext.BulkInsert(pageList); + await _logger.AddInfo($"成功获取 {pageResponse.Data.Rows.Count} 条记录", TaskName); + } + else + { + await _logger.AddError($"第 {currentPage} 页未返回数据", TaskName); + } + // 简单的请求间隔,避免过于频繁 + await Task.Delay(200); + } + await _logger.AddInfo($"所有数据获取完成,总共获取了 {allData.Count} 条记录", TaskName); } + } - await _logger.AddInfo($"所有数据获取完成,总共获取了 {allData.Count} 条记录", TaskName); - } + // 首次请求获取总条数和分页信息 + return allData; @@ -245,11 +304,12 @@ namespace TaskManager.Controllers TaskName = taskName; await FetchAllDataAsync(inputdate); } - protected override async Task DoExecutingAsync(string url, string path, string takName) + protected override async Task DoExecutingAsync(string url, string path, string takName,string client) { Url = url; Path = path; TaskName = takName; + Client = client; await FetchAllDataAsync(string.Empty); }