87 lines
4.1 KiB
C#
87 lines
4.1 KiB
C#
|
|
using System;
|
|||
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|||
|
|
|
|||
|
|
#nullable disable
|
|||
|
|
|
|||
|
|
namespace wtmProject.DataAccess.Migrations
|
|||
|
|
{
|
|||
|
|
public partial class hmr2024040101 : Migration
|
|||
|
|
{
|
|||
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.CreateTable(
|
|||
|
|
name: "WTM_BUSINESS",
|
|||
|
|
columns: table => new
|
|||
|
|
{
|
|||
|
|
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
|||
|
|
CustomId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|||
|
|
VisitObjectId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|||
|
|
ProjectId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|||
|
|
BusinessName = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
BusinessStatus = table.Column<int>(type: "int", nullable: true),
|
|||
|
|
MarkManageId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
|||
|
|
Requirement = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
Proposal = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
BusinessProject = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
Follow = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
Negotiation = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
|||
|
|
TenantCode = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
|||
|
|
CreateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|||
|
|
CreateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
|
|||
|
|
UpdateTime = table.Column<DateTime>(type: "datetime2", nullable: true),
|
|||
|
|
UpdateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true)
|
|||
|
|
},
|
|||
|
|
constraints: table =>
|
|||
|
|
{
|
|||
|
|
table.PrimaryKey("PK_WTM_BUSINESS", x => x.ID);
|
|||
|
|
table.ForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_FrameworkUsers_MarkManageId",
|
|||
|
|
column: x => x.MarkManageId,
|
|||
|
|
principalTable: "FrameworkUsers",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
table.ForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_CustomId",
|
|||
|
|
column: x => x.CustomId,
|
|||
|
|
principalTable: "WTM_CUSTOM",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
table.ForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_CUSTOM_PERSON_VisitObjectId",
|
|||
|
|
column: x => x.VisitObjectId,
|
|||
|
|
principalTable: "WTM_CUSTOM_PERSON",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
table.ForeignKey(
|
|||
|
|
name: "FK_WTM_BUSINESS_WTM_PROJECT_ProjectId",
|
|||
|
|
column: x => x.ProjectId,
|
|||
|
|
principalTable: "WTM_PROJECT",
|
|||
|
|
principalColumn: "ID");
|
|||
|
|
});
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_WTM_BUSINESS_CustomId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "CustomId");
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_WTM_BUSINESS_MarkManageId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "MarkManageId");
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_WTM_BUSINESS_ProjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "ProjectId");
|
|||
|
|
|
|||
|
|
migrationBuilder.CreateIndex(
|
|||
|
|
name: "IX_WTM_BUSINESS_VisitObjectId",
|
|||
|
|
table: "WTM_BUSINESS",
|
|||
|
|
column: "VisitObjectId");
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|||
|
|
{
|
|||
|
|
migrationBuilder.DropTable(
|
|||
|
|
name: "WTM_BUSINESS");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|