- Admin 엔티티에 AgreeTerms, AgreePrivacy, AgreedAt 필드 추가 - SignupRequestDto에 동의 필드 추가 (필수 검증) - SignupResponseDto에 verifySessionId, emailSent 응답 추가 - AuthService.SignupAsync: 동의 검증, verify session 생성, 메일 발송 try-catch - ErrorCodes에 TermsNotAgreed(114), PrivacyNotAgreed(115) 추가 - EF Core 마이그레이션 AddConsentFieldsToAdmin 생성/적용 Closes #202
53 lines
1.5 KiB
C#
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");
|
|
}
|
|
}
|
|
}
|