sunpengfei
2025-08-13 c1bff84f284ee912a3db6b866be3916e1d762a90
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
using System;
using Microsoft.EntityFrameworkCore.Migrations;
 
#nullable disable
 
namespace FlexJobApi.Database.Migrations.Migrations
{
    /// <inheritdoc />
    public partial class UpdateUser0812004 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "CheckReceiveStatus",
                table: "TaskInfoUser",
                type: "int",
                nullable: true);
 
            migrationBuilder.AddColumn<DateTime>(
                name: "CheckReceiveTime",
                table: "TaskInfoUser",
                type: "datetime2",
                nullable: true);
 
            migrationBuilder.CreateTable(
                name: "TaskInfoUserSubmit",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    TaskInfoUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    CheckReceiveStatus = table.Column<int>(type: "int", nullable: false),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    CreatedEnterpriseId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    UpdatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TaskInfoUserSubmit", x => x.Id);
                    table.ForeignKey(
                        name: "FK_TaskInfoUserSubmit_TaskInfoUser_TaskInfoUserId",
                        column: x => x.TaskInfoUserId,
                        principalTable: "TaskInfoUser",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });
 
            migrationBuilder.CreateTable(
                name: "TaskInfoUserSubmitFile",
                columns: table => new
                {
                    Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    SubmitId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
                    File = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    CreatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: false),
                    UpdatedTime = table.Column<DateTimeOffset>(type: "datetimeoffset", nullable: true),
                    Sort = table.Column<int>(type: "int", nullable: false),
                    TraceId = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    CreatedEnterpriseId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    UpdatedUserId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
                    IsDeleted = table.Column<bool>(type: "bit", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_TaskInfoUserSubmitFile", x => x.Id);
                    table.ForeignKey(
                        name: "FK_TaskInfoUserSubmitFile_TaskInfoUserSubmit_SubmitId",
                        column: x => x.SubmitId,
                        principalTable: "TaskInfoUserSubmit",
                        principalColumn: "Id",
                        onDelete: ReferentialAction.Cascade);
                });
 
            migrationBuilder.CreateIndex(
                name: "IX_TaskInfoUserSubmit_TaskInfoUserId",
                table: "TaskInfoUserSubmit",
                column: "TaskInfoUserId");
 
            migrationBuilder.CreateIndex(
                name: "IX_TaskInfoUserSubmitFile_SubmitId",
                table: "TaskInfoUserSubmitFile",
                column: "SubmitId");
        }
 
        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "TaskInfoUserSubmitFile");
 
            migrationBuilder.DropTable(
                name: "TaskInfoUserSubmit");
 
            migrationBuilder.DropColumn(
                name: "CheckReceiveStatus",
                table: "TaskInfoUser");
 
            migrationBuilder.DropColumn(
                name: "CheckReceiveTime",
                table: "TaskInfoUser");
        }
    }
}