using System; using Microsoft.EntityFrameworkCore.Metadata; using Microsoft.EntityFrameworkCore.Migrations; #nullable disable namespace HHWMS.Web.Migrations { public partial class init : Migration { protected override void Up(MigrationBuilder migrationBuilder) { migrationBuilder.AlterDatabase() .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ActionLogs", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ModuleName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ITCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionUrl = table.Column(type: "varchar(250)", maxLength: 250, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionTime = table.Column(type: "datetime(6)", nullable: false), Duration = table.Column(type: "double", nullable: false), Remark = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), IP = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), LogType = table.Column(type: "int", nullable: false), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Request = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Result = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ActionLogs", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "Container", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器类型") .Annotation("MySql:CharSet", "utf8mb4"), IsLock = table.Column(type: "smallint", nullable: false, comment: "锁类型"), Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器状态") .Annotation("MySql:CharSet", "utf8mb4"), LocationCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库位编码") .Annotation("MySql:CharSet", "utf8mb4"), Length = table.Column(type: "decimal(8,3)", nullable: true, comment: "长"), Width = table.Column(type: "decimal(8,3)", nullable: true, comment: "宽"), Height = table.Column(type: "decimal(8,3)", nullable: true, comment: "高"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_Container", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "DataPrivileges", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), UserCode = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), GroupCode = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TableName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), RelateId = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Domain = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_DataPrivileges", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FileAttachments", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), FileName = table.Column(type: "longtext", nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), FileExt = table.Column(type: "varchar(10)", maxLength: 10, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Path = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Length = table.Column(type: "bigint", nullable: false), UploadTime = table.Column(type: "datetime(6)", nullable: false), SaveMode = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), FileData = table.Column(type: "longblob", nullable: true), ExtraInfo = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), HandlerInfo = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FileAttachments", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkGroups", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), GroupCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), GroupName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), GroupRemark = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Manager = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_FrameworkGroups", x => x.ID); table.ForeignKey( name: "FK_FrameworkGroups_FrameworkGroups_ParentId", column: x => x.ParentId, principalTable: "FrameworkGroups", principalColumn: "ID"); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkMenus", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), PageName = table.Column(type: "varchar(100)", maxLength: 100, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), ActionName = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ModuleName = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), FolderOnly = table.Column(type: "tinyint(1)", nullable: false), IsInherit = table.Column(type: "tinyint(1)", nullable: false), ClassName = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), MethodName = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Domain = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ShowOnMenu = table.Column(type: "tinyint(1)", nullable: false), IsPublic = table.Column(type: "tinyint(1)", nullable: false), DisplayOrder = table.Column(type: "int", nullable: false), IsInside = table.Column(type: "tinyint(1)", nullable: false), TenantAllowed = table.Column(type: "tinyint(1)", nullable: true), Url = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Icon = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ParentId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci") }, constraints: table => { table.PrimaryKey("PK_FrameworkMenus", x => x.ID); table.ForeignKey( name: "FK_FrameworkMenus_FrameworkMenus_ParentId", column: x => x.ParentId, principalTable: "FrameworkMenus", principalColumn: "ID"); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkRoles", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), RoleCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), RoleName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), RoleRemark = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FrameworkRoles", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkTenants", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), TCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), TName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), TDb = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TDbType = table.Column(type: "int", nullable: true), DbContext = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TDomain = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), EnableSub = table.Column(type: "tinyint(1)", nullable: false), Enabled = table.Column(type: "tinyint(1)", nullable: false), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FrameworkTenants", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkUserGroups", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), UserCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), GroupCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FrameworkUserGroups", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkUserRoles", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), UserCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), RoleCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FrameworkUserRoles", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FunctionPrivileges", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), RoleCode = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), MenuItemId = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Allowed = table.Column(type: "tinyint(1)", nullable: false), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FunctionPrivileges", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "InterfaceLogs", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ModuleName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ITCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionUrl = table.Column(type: "varchar(250)", maxLength: 250, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionTime = table.Column(type: "datetime(6)", nullable: false), Duration = table.Column(type: "double", nullable: false), Remark = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), IP = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), LogType = table.Column(type: "int", nullable: false), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Request = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Result = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_InterfaceLogs", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "Inventory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), LocationCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库位编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), TaskQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "任务数量"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), ReceiptCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "入库单号") .Annotation("MySql:CharSet", "utf8mb4"), ReceiptDetailId = table.Column(type: "int", nullable: true, comment: "明细ID"), Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), TaskStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "任务状态") .Annotation("MySql:CharSet", "utf8mb4"), Flag = table.Column(type: "int", nullable: false, comment: "格数"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_Inventory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "InventoryTransaction", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "交易类型") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), LocationCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库位编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), BillType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据类型") .Annotation("MySql:CharSet", "utf8mb4"), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), BillCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据编号") .Annotation("MySql:CharSet", "utf8mb4"), BillDetailId = table.Column(type: "int", maxLength: 50, nullable: true, comment: "明细ID"), Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_InventoryTransaction", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "JobLogs", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), ModuleName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionName = table.Column(type: "varchar(255)", maxLength: 255, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ITCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionUrl = table.Column(type: "varchar(250)", maxLength: 250, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ActionTime = table.Column(type: "datetime(6)", nullable: false), Duration = table.Column(type: "double", nullable: false), Remark = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), IP = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), LogType = table.Column(type: "int", nullable: false), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Request = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Result = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_JobLogs", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "Location", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库位编码") .Annotation("MySql:CharSet", "utf8mb4"), Type = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "库位类型") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库位状态") .Annotation("MySql:CharSet", "utf8mb4"), Row = table.Column(type: "smallint", nullable: false, comment: "行"), Line = table.Column(type: "smallint", nullable: false, comment: "列"), Layer = table.Column(type: "smallint", nullable: false, comment: "层"), RoadWay = table.Column(type: "smallint", nullable: false, comment: "巷道"), RowFlag = table.Column(type: "smallint", nullable: true, comment: "内外标识,0:外仓位,1:里仓位"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), IsStop = table.Column(type: "tinyint(1)", nullable: false, comment: "是否禁用"), Length = table.Column(type: "decimal(8,3)", nullable: true, comment: "长"), Width = table.Column(type: "decimal(8,3)", nullable: true, comment: "宽"), Height = table.Column(type: "decimal(8,3)", nullable: true, comment: "高"), ContiguousCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "相邻库位") .Annotation("MySql:CharSet", "utf8mb4"), Version = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_Location", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "Material", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), UniqueCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "唯一码") .Annotation("MySql:CharSet", "utf8mb4"), QRCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "二维码") .Annotation("MySql:CharSet", "utf8mb4"), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_Material", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "PrintConfig", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "名称") .Annotation("MySql:CharSet", "utf8mb4"), Template = table.Column(type: "longtext", nullable: false, comment: "模板") .Annotation("MySql:CharSet", "utf8mb4"), TestData = table.Column(type: "longtext", nullable: false, comment: "测试数据") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_PrintConfig", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ReceiptDetailHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: ""), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), CompletedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "完成数量"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ReceiptDetailHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ReceiptHeader", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "入库单号") .Annotation("MySql:CharSet", "utf8mb4"), BillType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据类型") .Annotation("MySql:CharSet", "utf8mb4"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), TotalQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "总数量"), TotalLines = table.Column(type: "decimal(12,4)", nullable: true, comment: "总行数"), FirstStatus = table.Column(type: "smallint", nullable: true, comment: "首状态"), LastStatus = table.Column(type: "smallint", nullable: true, comment: "尾状态"), AppointmentTime = table.Column(type: "datetime(6)", nullable: true, comment: "预约时间"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ReceiptHeader", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ReceiptHeaderHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "入库单号") .Annotation("MySql:CharSet", "utf8mb4"), BillType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据类型") .Annotation("MySql:CharSet", "utf8mb4"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), TotalQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "总数量"), TotalLines = table.Column(type: "decimal(12,4)", nullable: true, comment: "总行数"), FirstStatus = table.Column(type: "smallint", nullable: true, comment: "首状态"), LastStatus = table.Column(type: "smallint", nullable: true, comment: "尾状态"), AppointmentTime = table.Column(type: "datetime(6)", nullable: true, comment: "预约时间"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ReceiptHeaderHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ReportDesign", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "名称") .Annotation("MySql:CharSet", "utf8mb4"), Sql = table.Column(type: "longtext", nullable: false, comment: "Sql") .Annotation("MySql:CharSet", "utf8mb4"), Params = table.Column(type: "longtext", nullable: false, comment: "参数") .Annotation("MySql:CharSet", "utf8mb4"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ReportDesign", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ShipmentDetailHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: ""), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), CompletedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "完成数量"), DividedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "已分配数量"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", maxLength: 50, nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ShipmentDetailHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ShipmentHeader", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "出库单号") .Annotation("MySql:CharSet", "utf8mb4"), BillType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据类型") .Annotation("MySql:CharSet", "utf8mb4"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), TotalQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "总数量"), TotalLines = table.Column(type: "decimal(12,4)", nullable: true, comment: "总行数"), FirstStatus = table.Column(type: "smallint", nullable: true, comment: "首状态"), LastStatus = table.Column(type: "smallint", nullable: true, comment: "尾状态"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ShipmentHeader", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ShipmentHeaderHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), SourceCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "上游单号") .Annotation("MySql:CharSet", "utf8mb4"), Code = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "出库单号") .Annotation("MySql:CharSet", "utf8mb4"), BillType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据类型") .Annotation("MySql:CharSet", "utf8mb4"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), TotalQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "总数量"), TotalLines = table.Column(type: "decimal(12,4)", nullable: true, comment: "总行数"), FirstStatus = table.Column(type: "smallint", nullable: true, comment: "首状态"), LastStatus = table.Column(type: "smallint", nullable: true, comment: "尾状态"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ShipmentHeaderHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "SysCount", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), Prefix = table.Column(type: "varchar(5)", maxLength: 5, nullable: true, comment: "前缀") .Annotation("MySql:CharSet", "utf8mb4"), Value = table.Column(type: "int", nullable: false, comment: "值"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_SysCount", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "SysDictType", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), DictName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "字典名称") .Annotation("MySql:CharSet", "utf8mb4"), DictType = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "字典类型") .Annotation("MySql:CharSet", "utf8mb4"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_SysDictType", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "SysJob", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), JobName = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务名称") .Annotation("MySql:CharSet", "utf8mb4"), JobGroup = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "任务组名") .Annotation("MySql:CharSet", "utf8mb4"), MethodName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "任务方法") .Annotation("MySql:CharSet", "utf8mb4"), MethodParams = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "参数") .Annotation("MySql:CharSet", "utf8mb4"), CronExpression = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "cron执行表达式") .Annotation("MySql:CharSet", "utf8mb4"), LastFireTime = table.Column(type: "datetime(6)", nullable: true, comment: "上次执行时间"), NextFireTime = table.Column(type: "datetime(6)", nullable: true, comment: "下次执行时间"), MisfirePolicy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "错误策略") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "tinyint unsigned", nullable: false, comment: "状态(1正常 0暂停)"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_SysJob", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "TaskDetailHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: "任务号"), OrderCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据编号") .Annotation("MySql:CharSet", "utf8mb4"), OrderDetailId = table.Column(type: "int", nullable: true, comment: "明细ID"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryId = table.Column(type: "int", nullable: true, comment: "库存Id"), FromLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始仓位") .Annotation("MySql:CharSet", "utf8mb4"), ToLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标仓位") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_TaskDetailHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "TaskHeader", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), TaskNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务号") .Annotation("MySql:CharSet", "utf8mb4"), TaskType = table.Column(type: "smallint", nullable: true, comment: "任务类型"), FromLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始仓位") .Annotation("MySql:CharSet", "utf8mb4"), ToLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标仓位") .Annotation("MySql:CharSet", "utf8mb4"), Station = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "站台") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), RoadWay = table.Column(type: "smallint", nullable: true, comment: "巷道"), Priority = table.Column(type: "smallint", nullable: true, comment: "优先级"), Status = table.Column(type: "smallint", nullable: true, comment: "任务状态"), ErrorMsg = table.Column(type: "longtext", nullable: true, comment: "错误信息") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_TaskHeader", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "TaskHeaderHistory", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), TaskNo = table.Column(type: "varchar(50)", maxLength: 50, nullable: false, comment: "任务号") .Annotation("MySql:CharSet", "utf8mb4"), TaskType = table.Column(type: "smallint", nullable: true, comment: "任务类型"), FromLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始仓位") .Annotation("MySql:CharSet", "utf8mb4"), ToLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标仓位") .Annotation("MySql:CharSet", "utf8mb4"), Station = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "站台") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), RoadWay = table.Column(type: "smallint", nullable: true, comment: "巷道"), Priority = table.Column(type: "smallint", nullable: true, comment: "优先级"), Status = table.Column(type: "smallint", nullable: true, comment: "任务状态"), ErrorMsg = table.Column(type: "longtext", nullable: true, comment: "错误信息") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_TaskHeaderHistory", x => x.ID); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "FrameworkUsers", columns: table => new { ID = table.Column(type: "char(36)", nullable: false, collation: "ascii_general_ci"), Email = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Gender = table.Column(type: "int", nullable: true), CellPhone = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), HomePhone = table.Column(type: "varchar(30)", maxLength: 30, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), Address = table.Column(type: "varchar(200)", maxLength: 200, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ZipCode = table.Column(type: "longtext", nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4"), ITCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Password = table.Column(type: "varchar(32)", maxLength: 32, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), Name = table.Column(type: "varchar(50)", maxLength: 50, nullable: false) .Annotation("MySql:CharSet", "utf8mb4"), IsValid = table.Column(type: "tinyint(1)", nullable: false), PhotoId = table.Column(type: "char(36)", nullable: true, collation: "ascii_general_ci"), TenantCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true) .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_FrameworkUsers", x => x.ID); table.ForeignKey( name: "FK_FrameworkUsers_FileAttachments_PhotoId", column: x => x.PhotoId, principalTable: "FileAttachments", principalColumn: "ID", onDelete: ReferentialAction.Restrict); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ReceiptDetail", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: ""), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), CompletedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "完成数量"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ReceiptDetail", x => x.ID); table.ForeignKey( name: "FK_ReceiptDetail_ReceiptHeader_HeaderId", column: x => x.HeaderId, principalTable: "ReceiptHeader", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "ShipmentDetail", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: ""), ZoneCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "库区") .Annotation("MySql:CharSet", "utf8mb4"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料类型") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ManufactureDate = table.Column(type: "datetime(6)", nullable: true, comment: "生产日期"), ExpirationDate = table.Column(type: "datetime(6)", nullable: true, comment: "失效日期"), CompanyCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "公司") .Annotation("MySql:CharSet", "utf8mb4"), SupplierCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "供应商") .Annotation("MySql:CharSet", "utf8mb4"), CompletedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "完成数量"), DividedQty = table.Column(type: "decimal(12,4)", nullable: true, comment: "已分配数量"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryStatus = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料状态") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", maxLength: 50, nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_ShipmentDetail", x => x.ID); table.ForeignKey( name: "FK_ShipmentDetail_ShipmentHeader_HeaderId", column: x => x.HeaderId, principalTable: "ShipmentHeader", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "SysDictData", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), SysDictTypeId = table.Column(type: "int", nullable: false, comment: ""), DictSort = table.Column(type: "int", nullable: true, comment: "字典排序"), DictLabel = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "字典标签") .Annotation("MySql:CharSet", "utf8mb4"), DictLabelUs = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "英文标签") .Annotation("MySql:CharSet", "utf8mb4"), DictValue = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "字典键值") .Annotation("MySql:CharSet", "utf8mb4"), DictType = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "字典类型") .Annotation("MySql:CharSet", "utf8mb4"), CssClass = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "样式属性") .Annotation("MySql:CharSet", "utf8mb4"), Remark = table.Column(type: "longtext", nullable: true, comment: "备注") .Annotation("MySql:CharSet", "utf8mb4"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_SysDictData", x => x.ID); table.ForeignKey( name: "FK_SysDictData_SysDictType_SysDictTypeId", column: x => x.SysDictTypeId, principalTable: "SysDictType", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateTable( name: "TaskDetail", columns: table => new { ID = table.Column(type: "int", nullable: false) .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), HeaderId = table.Column(type: "int", nullable: false, comment: "任务号"), OrderCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单据编号") .Annotation("MySql:CharSet", "utf8mb4"), OrderDetailId = table.Column(type: "int", nullable: true, comment: "明细ID"), MaterialCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料编码") .Annotation("MySql:CharSet", "utf8mb4"), MaterialName = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "物料名称") .Annotation("MySql:CharSet", "utf8mb4"), MaterialSpec = table.Column(type: "longtext", nullable: true, comment: "物料规格") .Annotation("MySql:CharSet", "utf8mb4"), MaterialUnit = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "单位") .Annotation("MySql:CharSet", "utf8mb4"), Batch = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "批次") .Annotation("MySql:CharSet", "utf8mb4"), Lot = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "料号") .Annotation("MySql:CharSet", "utf8mb4"), ContainerCode = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "容器编码") .Annotation("MySql:CharSet", "utf8mb4"), Qty = table.Column(type: "decimal(12,4)", nullable: true, comment: "数量"), InventoryId = table.Column(type: "int", nullable: true, comment: "库存Id"), FromLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "起始仓位") .Annotation("MySql:CharSet", "utf8mb4"), ToLocation = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "目标仓位") .Annotation("MySql:CharSet", "utf8mb4"), Status = table.Column(type: "smallint", nullable: true, comment: "状态"), CreateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), CreateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4"), UpdateTime = table.Column(type: "datetime(6)", nullable: true, comment: ""), UpdateBy = table.Column(type: "varchar(50)", maxLength: 50, nullable: true, comment: "") .Annotation("MySql:CharSet", "utf8mb4") }, constraints: table => { table.PrimaryKey("PK_TaskDetail", x => x.ID); table.ForeignKey( name: "FK_TaskDetail_TaskHeader_HeaderId", column: x => x.HeaderId, principalTable: "TaskHeader", principalColumn: "ID", onDelete: ReferentialAction.Cascade); }) .Annotation("MySql:CharSet", "utf8mb4"); migrationBuilder.CreateIndex( name: "IX_FrameworkGroups_ParentId", table: "FrameworkGroups", column: "ParentId"); migrationBuilder.CreateIndex( name: "IX_FrameworkMenus_ParentId", table: "FrameworkMenus", column: "ParentId"); migrationBuilder.CreateIndex( name: "IX_FrameworkUsers_PhotoId", table: "FrameworkUsers", column: "PhotoId"); migrationBuilder.CreateIndex( name: "IX_ReceiptDetail_HeaderId", table: "ReceiptDetail", column: "HeaderId"); migrationBuilder.CreateIndex( name: "IX_ShipmentDetail_HeaderId", table: "ShipmentDetail", column: "HeaderId"); migrationBuilder.CreateIndex( name: "IX_SysDictData_SysDictTypeId", table: "SysDictData", column: "SysDictTypeId"); migrationBuilder.CreateIndex( name: "IX_TaskDetail_HeaderId", table: "TaskDetail", column: "HeaderId"); migrationBuilder.CreateIndex( name: "IX_TaskHeader_TaskNo", table: "TaskHeader", column: "TaskNo", unique: true); } protected override void Down(MigrationBuilder migrationBuilder) { migrationBuilder.DropTable( name: "ActionLogs"); migrationBuilder.DropTable( name: "Container"); migrationBuilder.DropTable( name: "DataPrivileges"); migrationBuilder.DropTable( name: "FrameworkGroups"); migrationBuilder.DropTable( name: "FrameworkMenus"); migrationBuilder.DropTable( name: "FrameworkRoles"); migrationBuilder.DropTable( name: "FrameworkTenants"); migrationBuilder.DropTable( name: "FrameworkUserGroups"); migrationBuilder.DropTable( name: "FrameworkUserRoles"); migrationBuilder.DropTable( name: "FrameworkUsers"); migrationBuilder.DropTable( name: "FunctionPrivileges"); migrationBuilder.DropTable( name: "InterfaceLogs"); migrationBuilder.DropTable( name: "Inventory"); migrationBuilder.DropTable( name: "InventoryTransaction"); migrationBuilder.DropTable( name: "JobLogs"); migrationBuilder.DropTable( name: "Location"); migrationBuilder.DropTable( name: "Material"); migrationBuilder.DropTable( name: "PrintConfig"); migrationBuilder.DropTable( name: "ReceiptDetail"); migrationBuilder.DropTable( name: "ReceiptDetailHistory"); migrationBuilder.DropTable( name: "ReceiptHeaderHistory"); migrationBuilder.DropTable( name: "ReportDesign"); migrationBuilder.DropTable( name: "ShipmentDetail"); migrationBuilder.DropTable( name: "ShipmentDetailHistory"); migrationBuilder.DropTable( name: "ShipmentHeaderHistory"); migrationBuilder.DropTable( name: "SysCount"); migrationBuilder.DropTable( name: "SysDictData"); migrationBuilder.DropTable( name: "SysJob"); migrationBuilder.DropTable( name: "TaskDetail"); migrationBuilder.DropTable( name: "TaskDetailHistory"); migrationBuilder.DropTable( name: "TaskHeaderHistory"); migrationBuilder.DropTable( name: "FileAttachments"); migrationBuilder.DropTable( name: "ReceiptHeader"); migrationBuilder.DropTable( name: "ShipmentHeader"); migrationBuilder.DropTable( name: "SysDictType"); migrationBuilder.DropTable( name: "TaskHeader"); } } }