ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
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
using System;
using Microsoft.EntityFrameworkCore.Migrations;
 
#nullable disable
 
namespace iWare.Wms.Database.Migrations.Migrations
{
    public partial class v103 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<string>(
                name: "WareLocationTypeCode",
                table: "wms_place",
                type: "nvarchar(max)",
                nullable: true);
 
            migrationBuilder.AddColumn<string>(
                name: "WareContainerTypeCode",
                table: "wms_material",
                type: "nvarchar(max)",
                nullable: true,
                comment: "车型");
 
            migrationBuilder.CreateTable(
                name: "wms_container_type",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    WareContainerTypeCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型编码"),
                    WareContainerTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型名称"),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "长"),
                    Height = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "高"),
                    Width = table.Column<decimal>(type: "decimal(18,2)", nullable: true, comment: "宽"),
                    LocationType = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "可入库位类型"),
                    Remarks = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    Status = table.Column<int>(type: "int", nullable: true, comment: "状态"),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "软删除标记")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wms_container_type", x => x.Id);
                },
                comment: "载具类型管理");
 
            migrationBuilder.CreateTable(
                name: "wms_location_type",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    WareLocationTypeCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型编码"),
                    WareLocationTypeName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "类型名称"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "状态"),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位长度"),
                    Width = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位宽度"),
                    Height = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位高度"),
                    MaxWeight = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "最大承重"),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "软删除标记")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wms_location_type", x => x.Id);
                },
                comment: "库位类型");
 
            migrationBuilder.CreateTable(
                name: "wms_part",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "Id主键"),
                    PartCode = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "零件编号"),
                    PartName = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "零件名称"),
                    MaterialCode = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Length = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位长度"),
                    Width = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位宽度"),
                    Height = table.Column<decimal>(type: "decimal(18,2)", nullable: false, comment: "库位高度"),
                    Remark = table.Column<string>(type: "nvarchar(max)", nullable: true, comment: "备注"),
                    Status = table.Column<int>(type: "int", nullable: false, comment: "状态"),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "创建时间"),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true, comment: "更新时间"),
                    CreatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "创建者Id"),
                    CreatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "创建者名称"),
                    UpdatedUserId = table.Column<long>(type: "bigint", nullable: true, comment: "修改者Id"),
                    UpdatedUserName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true, comment: "修改者名称"),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false, comment: "软删除标记")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_wms_part", x => x.Id);
                },
                comment: "零件信息");
        }
 
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "wms_container_type");
 
            migrationBuilder.DropTable(
                name: "wms_location_type");
 
            migrationBuilder.DropTable(
                name: "wms_part");
 
            migrationBuilder.DropColumn(
                name: "WareLocationTypeCode",
                table: "wms_place");
 
            migrationBuilder.DropColumn(
                name: "WareContainerTypeCode",
                table: "wms_material");
        }
    }
}