|
|
@@ -13,65 +13,6 @@ namespace Business.Migrations
|
|
|
migrationBuilder.AlterDatabase()
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "base_print_template",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
|
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
|
- Name = table.Column<string>(type: "longtext", nullable: false)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- TempType = table.Column<int>(type: "int", nullable: false),
|
|
|
- IsDefault = table.Column<bool>(type: "tinyint(1)", nullable: false),
|
|
|
- Status = table.Column<int>(type: "int", nullable: false),
|
|
|
- Sort = table.Column<int>(type: "int", nullable: false),
|
|
|
- Content = table.Column<string>(type: "longtext", nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- Remark = table.Column<string>(type: "longtext", nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- Orientation = table.Column<int>(type: "int", nullable: true),
|
|
|
- PaperKind = table.Column<int>(type: "int", nullable: true),
|
|
|
- PaperWidth = table.Column<double>(type: "double", nullable: true),
|
|
|
- PaperHeight = table.Column<double>(type: "double", nullable: true),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
|
|
|
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_base_print_template", x => x.Id);
|
|
|
- })
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "Book",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
|
|
|
- TenantId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
|
|
|
- Name = table.Column<string>(type: "longtext", nullable: false)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- Description = table.Column<string>(type: "longtext", nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- Price = table.Column<int>(type: "int", nullable: false),
|
|
|
- ExtraProperties = table.Column<string>(type: "longtext", nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true)
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- CreationTime = table.Column<DateTime>(type: "datetime", nullable: false),
|
|
|
- CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
|
|
|
- LastModificationTime = table.Column<DateTime>(type: "datetime", nullable: true),
|
|
|
- LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_Book", x => x.Id);
|
|
|
- })
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
migrationBuilder.CreateTable(
|
|
|
name: "crm_customer",
|
|
|
columns: table => new
|
|
|
@@ -415,6 +356,11 @@ namespace Business.Migrations
|
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
bom_number = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom单编号")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
+ item_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料代码")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ item_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
bom_num = table.Column<int>(type: "int", nullable: false, comment: "序号"),
|
|
|
fse_status = table.Column<int>(type: "int", nullable: false, comment: "使用状态"),
|
|
|
begin_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生效日期"),
|
|
|
@@ -469,8 +415,12 @@ namespace Business.Migrations
|
|
|
bom_id = table.Column<long>(type: "bigint", nullable: false, comment: "bom主键"),
|
|
|
bom_number = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "bom单编号")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- parent_child_id = table.Column<long>(type: "bigint", nullable: false, comment: "父级id"),
|
|
|
+ is_bom = table.Column<int>(type: "int", nullable: false, comment: "是否是BOM"),
|
|
|
icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
+ item_number = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料代码")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ item_name = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true, comment: "物料名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
unit = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "单位")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "用量"),
|
|
|
@@ -492,6 +442,7 @@ namespace Business.Migrations
|
|
|
begin_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "生效日期"),
|
|
|
end_day = table.Column<DateTime>(type: "datetime", nullable: true, comment: "失效日期"),
|
|
|
op_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "操作时间"),
|
|
|
+ child_num = table.Column<int>(type: "int", nullable: false, comment: "序号"),
|
|
|
create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
@@ -908,50 +859,6 @@ namespace Business.Migrations
|
|
|
comment: "物料采购计划表")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "ic_purchase",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- ic_purchase_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
- icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- ic_plan_id = table.Column<long>(type: "bigint", nullable: false, comment: "计划id"),
|
|
|
- order_rector_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- order_rector_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人_工号")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- factory_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- order_dept = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购部门")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- order_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购单价"),
|
|
|
- sale_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "销售单价"),
|
|
|
- qty_min = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最小订货量"),
|
|
|
- batch_append_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "批量增量"),
|
|
|
- pov_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购订单差异科目代码"),
|
|
|
- piv_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购发票差异科目代码"),
|
|
|
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_ic_purchase", x => x.ic_purchase_id);
|
|
|
- },
|
|
|
- comment: "物料采购信息表")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
migrationBuilder.CreateTable(
|
|
|
name: "ic_substitute",
|
|
|
columns: table => new
|
|
|
@@ -2039,12 +1946,12 @@ namespace Business.Migrations
|
|
|
name: "mes_tech_proc_workshop_equipment",
|
|
|
columns: table => new
|
|
|
{
|
|
|
- tech_proc_workshop_equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
+ tech_proc_equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
equip_id = table.Column<long>(type: "bigint", nullable: false, comment: "设备id"),
|
|
|
equip_name = table.Column<string>(type: "varchar(100)", maxLength: 100, nullable: true, comment: "设备名称")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- tech_proc_workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工位id"),
|
|
|
+ tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序id"),
|
|
|
work_calendar_id = table.Column<long>(type: "bigint", nullable: true, comment: "工作日历id"),
|
|
|
create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
@@ -2061,7 +1968,7 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_mes_tech_proc_workshop_equipment", x => x.tech_proc_workshop_equip_id);
|
|
|
+ table.PrimaryKey("PK_mes_tech_proc_workshop_equipment", x => x.tech_proc_equip_id);
|
|
|
},
|
|
|
comment: "工艺路径关联设备表")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
@@ -2070,9 +1977,9 @@ namespace Business.Migrations
|
|
|
name: "mes_tech_proc_workshop_icitem",
|
|
|
columns: table => new
|
|
|
{
|
|
|
- tech_proc_workshop_icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
+ tech_proc_icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- tech_proc_workshop_id = table.Column<long>(type: "bigint", nullable: false, comment: "工序工位id"),
|
|
|
+ tech_proc_id = table.Column<long>(type: "bigint", nullable: false, comment: "工艺工序id"),
|
|
|
icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
qty = table.Column<int>(type: "int", nullable: false, comment: "数量"),
|
|
|
create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
@@ -2090,7 +1997,7 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_mes_tech_proc_workshop_icitem", x => x.tech_proc_workshop_icitem_id);
|
|
|
+ table.PrimaryKey("PK_mes_tech_proc_workshop_icitem", x => x.tech_proc_icitem_id);
|
|
|
},
|
|
|
comment: "发料到工位表")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
@@ -2272,7 +2179,132 @@ namespace Business.Migrations
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
- name: "po_list",
|
|
|
+ name: "sim_base",
|
|
|
+ columns: table => new
|
|
|
+ {
|
|
|
+ sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
+ sim_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "sim等级")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ sim_level = table.Column<int>(type: "int", nullable: true, comment: "sim层级顺序"),
|
|
|
+ rise_cycle = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "上升周期"),
|
|
|
+ interval_days = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "间隔天数"),
|
|
|
+ rise_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "上升时间"),
|
|
|
+ create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
+ create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
+ update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
+ update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
+ tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
+ factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
+ org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
+ },
|
|
|
+ constraints: table =>
|
|
|
+ {
|
|
|
+ table.PrimaryKey("PK_sim_base", x => x.sim_id);
|
|
|
+ },
|
|
|
+ comment: "sim基本表")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+
|
|
|
+ migrationBuilder.CreateTable(
|
|
|
+ name: "sim_issue_type",
|
|
|
+ columns: table => new
|
|
|
+ {
|
|
|
+ issue_type_id = table.Column<long>(type: "bigint", nullable: false, comment: "上升时间")
|
|
|
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
+ type_code = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别代码")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ type_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ app_scenario = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "应用场景")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ issue_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "问题等级")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ duty_person = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "责任人")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ duty_dept = table.Column<long>(type: "bigint", nullable: true, comment: "责任部门id"),
|
|
|
+ create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
+ create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
+ update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
+ update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
+ tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
+ factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
+ org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
+ },
|
|
|
+ constraints: table =>
|
|
|
+ {
|
|
|
+ table.PrimaryKey("PK_sim_issue_type", x => x.issue_type_id);
|
|
|
+ },
|
|
|
+ comment: "sim事项类别表")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+
|
|
|
+ migrationBuilder.CreateTable(
|
|
|
+ name: "sim_plant",
|
|
|
+ columns: table => new
|
|
|
+ {
|
|
|
+ plant_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
+ plant_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "事项名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
+ create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
+ update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
+ update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
+ tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
+ factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
+ org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
+ },
|
|
|
+ constraints: table =>
|
|
|
+ {
|
|
|
+ table.PrimaryKey("PK_sim_plant", x => x.plant_id);
|
|
|
+ },
|
|
|
+ comment: "sim事项表")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+
|
|
|
+ migrationBuilder.CreateTable(
|
|
|
+ name: "sim_user_relation",
|
|
|
+ columns: table => new
|
|
|
+ {
|
|
|
+ id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
+ .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
+ sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "base_sim表ID"),
|
|
|
+ user_id = table.Column<long>(type: "bigint", nullable: false, comment: "用户id"),
|
|
|
+ create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
+ create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
+ update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
+ update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
+ update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
+ tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
+ factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
+ org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
+ IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
+ },
|
|
|
+ constraints: table =>
|
|
|
+ {
|
|
|
+ table.PrimaryKey("PK_sim_user_relation", x => x.id);
|
|
|
+ },
|
|
|
+ comment: "sim用户关联表")
|
|
|
+ .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
+
|
|
|
+ migrationBuilder.CreateTable(
|
|
|
+ name: "srm_po_list",
|
|
|
columns: table => new
|
|
|
{
|
|
|
polist_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
@@ -2328,13 +2360,13 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_po_list", x => x.polist_id);
|
|
|
+ table.PrimaryKey("PK_srm_po_list", x => x.polist_id);
|
|
|
},
|
|
|
comment: "采购订单明细详情")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
- name: "po_main",
|
|
|
+ name: "srm_po_main",
|
|
|
columns: table => new
|
|
|
{
|
|
|
po_Id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
@@ -2377,13 +2409,13 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_po_main", x => x.po_Id);
|
|
|
+ table.PrimaryKey("PK_srm_po_main", x => x.po_Id);
|
|
|
},
|
|
|
comment: "采购订单")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
- name: "po_occupy",
|
|
|
+ name: "srm_po_occupy",
|
|
|
columns: table => new
|
|
|
{
|
|
|
pooccupy_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
@@ -2419,13 +2451,13 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_po_occupy", x => x.pooccupy_id);
|
|
|
+ table.PrimaryKey("PK_srm_po_occupy", x => x.pooccupy_id);
|
|
|
},
|
|
|
comment: "采购订单占用详情")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
- name: "pr_main",
|
|
|
+ name: "srm_pr_main",
|
|
|
columns: table => new
|
|
|
{
|
|
|
pr_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
@@ -2490,116 +2522,35 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_pr_main", x => x.pr_id);
|
|
|
+ table.PrimaryKey("PK_srm_pr_main", x => x.pr_id);
|
|
|
},
|
|
|
comment: "采购申请单")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
- name: "sim_base",
|
|
|
+ name: "srm_purchase",
|
|
|
columns: table => new
|
|
|
{
|
|
|
- sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- sim_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "sim等级")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- sim_level = table.Column<int>(type: "int", nullable: true, comment: "sim层级顺序"),
|
|
|
- rise_cycle = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "上升周期"),
|
|
|
- interval_days = table.Column<decimal>(type: "decimal(10,0)", precision: 10, scale: 0, nullable: true, comment: "间隔天数"),
|
|
|
- rise_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "上升时间"),
|
|
|
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_sim_base", x => x.sim_id);
|
|
|
- },
|
|
|
- comment: "sim基本表")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "sim_issue_type",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- issue_type_id = table.Column<long>(type: "bigint", nullable: false, comment: "上升时间")
|
|
|
+ ic_purchase_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键")
|
|
|
.Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- type_code = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别代码")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- type_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "类别名称")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- app_scenario = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "应用场景")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- issue_grade = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "问题等级")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- duty_person = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "责任人")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- duty_dept = table.Column<long>(type: "bigint", nullable: true, comment: "责任部门id"),
|
|
|
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ icitem_id = table.Column<long>(type: "bigint", nullable: false, comment: "物料id"),
|
|
|
+ icitem_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "物料名称")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ ic_plan_id = table.Column<long>(type: "bigint", nullable: false, comment: "计划id"),
|
|
|
+ order_rector_name = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_sim_issue_type", x => x.issue_type_id);
|
|
|
- },
|
|
|
- comment: "sim事项类别表")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "sim_plant",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- plant_id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- plant_name = table.Column<string>(type: "varchar(255)", maxLength: 255, nullable: true, comment: "事项名称")
|
|
|
+ order_rector_num = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购负责人_工号")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
- create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
+ factory_code = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "工厂编码")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- create_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "创建时间"),
|
|
|
- update_by = table.Column<long>(type: "bigint", nullable: true, comment: "修改人"),
|
|
|
- update_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "修改人名称")
|
|
|
+ order_dept = table.Column<string>(type: "varchar(80)", maxLength: 80, nullable: true, comment: "采购部门")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
- update_time = table.Column<DateTime>(type: "datetime", nullable: true, comment: "修改时间"),
|
|
|
- tenant_id = table.Column<long>(type: "bigint", nullable: false, comment: "企业ID"),
|
|
|
- factory_id = table.Column<long>(type: "bigint", nullable: true, comment: "工厂ID"),
|
|
|
- org_id = table.Column<long>(type: "bigint", nullable: true, comment: "组织ID"),
|
|
|
- IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "删除标识")
|
|
|
- },
|
|
|
- constraints: table =>
|
|
|
- {
|
|
|
- table.PrimaryKey("PK_sim_plant", x => x.plant_id);
|
|
|
- },
|
|
|
- comment: "sim事项表")
|
|
|
- .Annotation("MySql:CharSet", "utf8mb4");
|
|
|
-
|
|
|
- migrationBuilder.CreateTable(
|
|
|
- name: "sim_user_relation",
|
|
|
- columns: table => new
|
|
|
- {
|
|
|
- id = table.Column<long>(type: "bigint", nullable: false, comment: "主键id")
|
|
|
- .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
|
|
|
- sim_id = table.Column<long>(type: "bigint", nullable: false, comment: "base_sim表ID"),
|
|
|
- user_id = table.Column<long>(type: "bigint", nullable: false, comment: "用户id"),
|
|
|
+ order_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "采购单价"),
|
|
|
+ sale_price = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "销售单价"),
|
|
|
+ qty_min = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "最小订货量"),
|
|
|
+ batch_append_qty = table.Column<decimal>(type: "decimal(20,8)", precision: 20, scale: 8, nullable: true, comment: "批量增量"),
|
|
|
+ pov_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购订单差异科目代码"),
|
|
|
+ piv_acct = table.Column<long>(type: "bigint", nullable: false, comment: "采购发票差异科目代码"),
|
|
|
create_by = table.Column<long>(type: "bigint", nullable: true, comment: "创建人id"),
|
|
|
create_by_name = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "创建人名称")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4"),
|
|
|
@@ -2615,9 +2566,9 @@ namespace Business.Migrations
|
|
|
},
|
|
|
constraints: table =>
|
|
|
{
|
|
|
- table.PrimaryKey("PK_sim_user_relation", x => x.id);
|
|
|
+ table.PrimaryKey("PK_srm_purchase", x => x.ic_purchase_id);
|
|
|
},
|
|
|
- comment: "sim用户关联表")
|
|
|
+ comment: "物料采购信息表")
|
|
|
.Annotation("MySql:CharSet", "utf8mb4");
|
|
|
|
|
|
migrationBuilder.CreateTable(
|
|
|
@@ -3310,12 +3261,6 @@ namespace Business.Migrations
|
|
|
|
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
|
{
|
|
|
- migrationBuilder.DropTable(
|
|
|
- name: "base_print_template");
|
|
|
-
|
|
|
- migrationBuilder.DropTable(
|
|
|
- name: "Book");
|
|
|
-
|
|
|
migrationBuilder.DropTable(
|
|
|
name: "crm_customer");
|
|
|
|
|
|
@@ -3361,9 +3306,6 @@ namespace Business.Migrations
|
|
|
migrationBuilder.DropTable(
|
|
|
name: "ic_plan");
|
|
|
|
|
|
- migrationBuilder.DropTable(
|
|
|
- name: "ic_purchase");
|
|
|
-
|
|
|
migrationBuilder.DropTable(
|
|
|
name: "ic_substitute");
|
|
|
|
|
|
@@ -3464,28 +3406,31 @@ namespace Business.Migrations
|
|
|
name: "mes_workshop_shelf");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "po_list");
|
|
|
+ name: "sim_base");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "po_main");
|
|
|
+ name: "sim_issue_type");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "po_occupy");
|
|
|
+ name: "sim_plant");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "pr_main");
|
|
|
+ name: "sim_user_relation");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "sim_base");
|
|
|
+ name: "srm_po_list");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "sim_issue_type");
|
|
|
+ name: "srm_po_main");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "sim_plant");
|
|
|
+ name: "srm_po_occupy");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
- name: "sim_user_relation");
|
|
|
+ name: "srm_pr_main");
|
|
|
+
|
|
|
+ migrationBuilder.DropTable(
|
|
|
+ name: "srm_purchase");
|
|
|
|
|
|
migrationBuilder.DropTable(
|
|
|
name: "srm_supplier");
|