SPMS_API/SPMS.Infrastructure/Migrations/20260225002821_AddConsentFieldsToAdmin.cs
SEAN 8224c7a17b improvement: 가입 계약 확장 — 동의 필드/세션/메일 발송 안정화 (#202)
- Admin 엔티티에 AgreeTerms, AgreePrivacy, AgreedAt 필드 추가
- SignupRequestDto에 동의 필드 추가 (필수 검증)
- SignupResponseDto에 verifySessionId, emailSent 응답 추가
- AuthService.SignupAsync: 동의 검증, verify session 생성, 메일 발송 try-catch
- ErrorCodes에 TermsNotAgreed(114), PrivacyNotAgreed(115) 추가
- EF Core 마이그레이션 AddConsentFieldsToAdmin 생성/적용

Closes #202
2026-02-25 09:29:17 +09:00

53 lines
1.5 KiB
C#

using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace SPMS.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class AddConsentFieldsToAdmin : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "AgreePrivacy",
table: "Admin",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "AgreeTerms",
table: "Admin",
type: "tinyint(1)",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<DateTime>(
name: "AgreedAt",
table: "Admin",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "AgreePrivacy",
table: "Admin");
migrationBuilder.DropColumn(
name: "AgreeTerms",
table: "Admin");
migrationBuilder.DropColumn(
name: "AgreedAt",
table: "Admin");
}
}
}