- Admin 엔티티에 MustChangePassword, TempPasswordIssuedAt 필드 추가 - POST /v1/in/account/password/temp 엔드포인트 추가 - 임시비밀번호 생성(12자, 영대소+숫자+특수) 및 메일 발송 - 로그인 시 CHANGE_PASSWORD 분기 추가 (VERIFY_EMAIL > CHANGE_PASSWORD > GO_DASHBOARD) - 비밀번호 변경 시 MustChangePassword 플래그 자동 해제 - LoginResponseDto에 must_change_password 필드 추가 - EF Core 마이그레이션 생성 및 적용 Closes #207
41 lines
1.1 KiB
C#
41 lines
1.1 KiB
C#
using System;
|
|
using Microsoft.EntityFrameworkCore.Migrations;
|
|
|
|
#nullable disable
|
|
|
|
namespace SPMS.Infrastructure.Migrations
|
|
{
|
|
/// <inheritdoc />
|
|
public partial class AddTempPasswordFieldsToAdmin : Migration
|
|
{
|
|
/// <inheritdoc />
|
|
protected override void Up(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.AddColumn<bool>(
|
|
name: "MustChangePassword",
|
|
table: "Admin",
|
|
type: "tinyint(1)",
|
|
nullable: false,
|
|
defaultValue: false);
|
|
|
|
migrationBuilder.AddColumn<DateTime>(
|
|
name: "TempPasswordIssuedAt",
|
|
table: "Admin",
|
|
type: "datetime(6)",
|
|
nullable: true);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void Down(MigrationBuilder migrationBuilder)
|
|
{
|
|
migrationBuilder.DropColumn(
|
|
name: "MustChangePassword",
|
|
table: "Admin");
|
|
|
|
migrationBuilder.DropColumn(
|
|
name: "TempPasswordIssuedAt",
|
|
table: "Admin");
|
|
}
|
|
}
|
|
}
|