using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Infrastructure.Migrations.AppDb
{
///
public partial class AddDeveloperEntity : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Developer",
columns: table => new
{
ID = table.Column(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
MemberID = table.Column(type: "int", nullable: false),
CompanyName = table.Column(type: "nvarchar(200)", maxLength: 200, nullable: false),
BusinessNumber = table.Column(type: "nvarchar(20)", maxLength: 20, nullable: false),
CeoName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
ContactName = table.Column(type: "nvarchar(100)", maxLength: 100, nullable: false),
ContactPhone = table.Column(type: "nvarchar(30)", maxLength: 30, nullable: false),
KycStatus = table.Column(type: "int", nullable: false),
KycCi = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
KycDi = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true),
KycVerifiedAt = table.Column(type: "datetime2", nullable: true),
ApprovalStatus = table.Column(type: "int", nullable: false),
ApprovalReason = table.Column(type: "nvarchar(500)", maxLength: 500, nullable: true),
ApprovedAt = table.Column(type: "datetime2", nullable: true),
ApprovedByAdminID = table.Column(type: "nvarchar(450)", maxLength: 450, nullable: true),
CreatedAt = table.Column(type: "datetime2", nullable: false),
UpdatedAt = table.Column(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_Developer", x => x.ID);
table.ForeignKey(
name: "FK_Developer_Member_MemberID",
column: x => x.MemberID,
principalTable: "Member",
principalColumn: "ID",
onDelete: ReferentialAction.Cascade);
},
comment: "개발자 포털 가입 법인 정보 (Member 1:1)");
migrationBuilder.CreateIndex(
name: "IX_Developer_ApprovalStatus",
table: "Developer",
column: "ApprovalStatus");
migrationBuilder.CreateIndex(
name: "IX_Developer_BusinessNumber",
table: "Developer",
column: "BusinessNumber");
migrationBuilder.CreateIndex(
name: "IX_Developer_MemberID",
table: "Developer",
column: "MemberID",
unique: true);
}
///
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "Developer");
}
}
}