schangxiang@126.com
2025-05-21 a3a2b238a2626ef8744e7a135f9ca2e2fbb5184c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
using System;
using Microsoft.EntityFrameworkCore.Migrations;
 
#nullable disable
 
namespace CMS.Plugin.PipeLineLems.MySQL.Migrations
{
    public partial class Update2 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterDatabase()
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateTable(
                name: "scms_callmaterialorderrecords",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "原料标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialBatch = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
                    Quantity = table.Column<int>(type: "int", nullable: false, comment: "叫料数量"),
                    WmsRetResult = table.Column<string>(type: "longtext", nullable: true, comment: "WMS返回结果")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WmsTaskNo = table.Column<string>(type: "longtext", nullable: true, comment: "WMS任务号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "并发戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "创建时间"),
                    CreatorId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "创建人ID", collation: "ascii_general_ci"),
                    LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
                    LastModifierId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "修改人ID", collation: "ascii_general_ci"),
                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否删除"),
                    DeleterId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "删除人ID", collation: "ascii_general_ci"),
                    DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    CreatorName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
                    Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_scms_callmaterialorderrecords", x => x.Id);
                },
                comment: "叫料记录表")
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateTable(
                name: "scms_callmaterialorders",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "原料标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialBatch = table.Column<string>(type: "longtext", nullable: true)
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
                    Quantity = table.Column<int>(type: "int", nullable: false, comment: "叫料数量"),
                    WmsRetResult = table.Column<string>(type: "longtext", nullable: true, comment: "WMS返回结果")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WmsTaskNo = table.Column<string>(type: "longtext", nullable: true, comment: "WMS任务号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "并发戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "创建时间"),
                    CreatorId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "创建人ID", collation: "ascii_general_ci"),
                    LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
                    LastModifierId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "修改人ID", collation: "ascii_general_ci"),
                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否删除"),
                    DeleterId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "删除人ID", collation: "ascii_general_ci"),
                    DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    CreatorName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OperationRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "操作备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DeleteRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "删除备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
                    Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"),
                    ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_scms_callmaterialorders", x => x.Id);
                },
                comment: "叫料单表")
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateTable(
                name: "scms_mytestentitynames",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Code = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Name = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: false, comment: "名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, comment: "排序"),
                    Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, comment: "是否禁用"),
                    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(6)", nullable: false),
                    CreatorId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
                    LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true),
                    LastModifierId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false),
                    DeleterId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
                    DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_scms_mytestentitynames", x => x.Id);
                },
                comment: "MyTestEntityName")
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateTable(
                name: "scms_workplans",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    TaskCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "任务编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSpecCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSectionName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSpecMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProcessName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工序名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ShipNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "船号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProjectNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "项目号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkPlanStatus = table.Column<int>(type: "int", nullable: false, comment: "计划状态"),
                    CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
                    ProcessRouteNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工艺流向编号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "长度(mm)"),
                    MarkingContent = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true, comment: "打码内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MarkingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "打码位置"),
                    CuttingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "切割位置"),
                    Quantity = table.Column<int>(type: "int", nullable: false, comment: "管段数量"),
                    FlangeThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰厚度(mm)"),
                    FlangeInnerDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰直径(mm)"),
                    WeldingHeatInput = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰公称压力")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeAllowableStress = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰冲码内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管长度(mm)"),
                    PipeWallThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管直径(mm)"),
                    FactoryCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工厂代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProductCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产品代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkstationCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工位代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    EquipmentCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "设备代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProdLineCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产线编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeFittingCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管件编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PreSerialNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "顺序号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OuterDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "外径(mm)"),
                    Thickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "壁厚(mm)"),
                    Material = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "材质")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PlannedStartTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划开始时间"),
                    PlannedEndTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划完成时间"),
                    TeamInfo = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "班组信息")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "时间戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "并发戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "创建时间"),
                    CreatorId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "创建人ID", collation: "ascii_general_ci"),
                    LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
                    LastModifierId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "修改人ID", collation: "ascii_general_ci"),
                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否删除"),
                    DeleterId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "删除人ID", collation: "ascii_general_ci"),
                    DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    CreatorName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OperationRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "操作备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DeleteRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "删除备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
                    Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"),
                    ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_scms_workplans", x => x.Id);
                },
                comment: "作业计划表")
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateTable(
                name: "scms_worktasks",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
                    Son_TaskCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "子任务编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    TaskCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: false, comment: "任务编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSpecCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSectionName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeSpecMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管段型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProcessName = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工序名称")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ShipNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "船号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProjectNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "项目号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkPlanStatus = table.Column<int>(type: "int", nullable: false, comment: "计划状态"),
                    CallMaterialStatus = table.Column<int>(type: "int", nullable: false, comment: "叫料状态"),
                    ProcessRouteNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工艺流向编号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DataIdentifier = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料标识")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaterialMode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "原料型号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "长度(mm)"),
                    MarkingContent = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true, comment: "打码内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MarkingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "打码位置"),
                    CuttingPosition = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "切割位置"),
                    Quantity = table.Column<int>(type: "int", nullable: false, comment: "管段数量"),
                    FlangeThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰厚度(mm)"),
                    FlangeInnerDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "法兰直径(mm)"),
                    WeldingHeatInput = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰公称压力")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeAllowableStress = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "法兰冲码内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管长度(mm)"),
                    PipeWallThickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "套管直径(mm)"),
                    FactoryCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工厂代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProductCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产品代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    WorkstationCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "工位代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    EquipmentCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "设备代码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ProdLineCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "产线编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PipeFittingCode = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "管件编码")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PreSerialNumber = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "顺序号")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OuterDiameter = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "外径(mm)"),
                    Thickness = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "壁厚(mm)"),
                    Material = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "材质")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    PlannedStartTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划开始时间"),
                    PlannedEndTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "计划完成时间"),
                    TeamInfo = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "班组信息")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Timestamp = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "时间戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraProperties = table.Column<string>(type: "longtext", nullable: true, comment: "扩展属性")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ConcurrencyStamp = table.Column<string>(type: "varchar(40)", maxLength: 40, nullable: true, comment: "并发戳")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    CreationTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "创建时间"),
                    CreatorId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "创建人ID", collation: "ascii_general_ci"),
                    LastModificationTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "修改时间"),
                    LastModifierId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "修改人ID", collation: "ascii_general_ci"),
                    IsDeleted = table.Column<bool>(type: "tinyint(1)", nullable: false, defaultValue: false, comment: "是否删除"),
                    DeleterId = table.Column<Guid>(type: "char(36)", maxLength: 36, nullable: true, comment: "删除人ID", collation: "ascii_general_ci"),
                    DeletionTime = table.Column<DateTime>(type: "datetime(6)", nullable: true, comment: "删除时间"),
                    CreatorName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "创建人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    LastModifierName = table.Column<string>(type: "varchar(64)", maxLength: 64, nullable: true, comment: "修改人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    OperationRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "操作备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    DeleteRemark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "删除备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    Sort = table.Column<int>(type: "int", nullable: false, defaultValue: 0, comment: "排序"),
                    Remark = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "备注")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    IsDisabled = table.Column<bool>(type: "tinyint(1)", nullable: true, defaultValue: false, comment: "是否禁用"),
                    ExtraField1 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段1")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField2 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段2")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    ExtraField3 = table.Column<string>(type: "varchar(256)", maxLength: 256, nullable: true, comment: "扩展字段3")
                        .Annotation("MySql:CharSet", "utf8mb4")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_scms_worktasks", x => x.Id);
                },
                comment: "作业任务表")
                .Annotation("MySql:CharSet", "utf8mb4");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_callmaterialorderrecords_DataIdentifier",
                table: "scms_callmaterialorderrecords",
                column: "DataIdentifier");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_callmaterialorders_DataIdentifier",
                table: "scms_callmaterialorders",
                column: "DataIdentifier",
                unique: true);
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_mytestentitynames_Name",
                table: "scms_mytestentitynames",
                column: "Name");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_workplans_DataIdentifier",
                table: "scms_workplans",
                column: "DataIdentifier");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_workplans_PlannedEndTime",
                table: "scms_workplans",
                column: "PlannedEndTime");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_workplans_PlannedStartTime",
                table: "scms_workplans",
                column: "PlannedStartTime");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_workplans_TaskCode",
                table: "scms_workplans",
                column: "TaskCode",
                unique: true);
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_worktasks_DataIdentifier",
                table: "scms_worktasks",
                column: "DataIdentifier");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_worktasks_PlannedEndTime",
                table: "scms_worktasks",
                column: "PlannedEndTime");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_worktasks_PlannedStartTime",
                table: "scms_worktasks",
                column: "PlannedStartTime");
 
            migrationBuilder.CreateIndex(
                name: "IX_scms_worktasks_Son_TaskCode",
                table: "scms_worktasks",
                column: "Son_TaskCode",
                unique: true);
        }
 
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "scms_callmaterialorderrecords");
 
            migrationBuilder.DropTable(
                name: "scms_callmaterialorders");
 
            migrationBuilder.DropTable(
                name: "scms_mytestentitynames");
 
            migrationBuilder.DropTable(
                name: "scms_workplans");
 
            migrationBuilder.DropTable(
                name: "scms_worktasks");
        }
    }
}