| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- using System;
- using Microsoft.EntityFrameworkCore.Migrations;
- #nullable disable
- namespace Infrastructure.Migrations.AppDb
- {
- /// <inheritdoc />
- public partial class AddDeveloperEntity : Migration
- {
- /// <inheritdoc />
- protected override void Up(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.CreateTable(
- name: "Developer",
- columns: table => new
- {
- ID = table.Column<int>(type: "int", nullable: false)
- .Annotation("SqlServer:Identity", "1, 1"),
- MemberID = table.Column<int>(type: "int", nullable: false),
- CompanyName = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: false),
- BusinessNumber = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: false),
- CeoName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- ContactName = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: false),
- ContactPhone = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
- KycStatus = table.Column<int>(type: "int", nullable: false),
- KycCi = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
- KycDi = table.Column<string>(type: "nvarchar(256)", maxLength: 256, nullable: true),
- KycVerifiedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- ApprovalStatus = table.Column<int>(type: "int", nullable: false),
- ApprovalReason = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
- ApprovedAt = table.Column<DateTime>(type: "datetime2", nullable: true),
- ApprovedByAdminID = table.Column<string>(type: "nvarchar(450)", maxLength: 450, nullable: true),
- CreatedAt = table.Column<DateTime>(type: "datetime2", nullable: false),
- UpdatedAt = table.Column<DateTime>(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);
- }
- /// <inheritdoc />
- protected override void Down(MigrationBuilder migrationBuilder)
- {
- migrationBuilder.DropTable(
- name: "Developer");
- }
- }
- }
|