fix issue #1572
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m49s

This commit is contained in:
Suphonchai Phoonsawat 2026-05-05 12:37:38 +07:00
parent e326e43ae6
commit 63d983f831
9 changed files with 1946 additions and 28 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,62 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class ChangeField : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "LeaveDaysUsed",
table: "LeaveBeginnings",
type: "double",
nullable: true,
comment: "จำนวนวันลาที่ใช้ไป",
oldClrType: typeof(double),
oldType: "double",
oldComment: "จำนวนวันลาที่ใช้ไป");
migrationBuilder.AlterColumn<int>(
name: "LeaveCount",
table: "LeaveBeginnings",
type: "int",
nullable: true,
comment: "จำนวนครั้งที่ลาสะสม",
oldClrType: typeof(int),
oldType: "int",
oldComment: "จำนวนครั้งที่ลาสะสม");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<double>(
name: "LeaveDaysUsed",
table: "LeaveBeginnings",
type: "double",
nullable: false,
defaultValue: 0.0,
comment: "จำนวนวันลาที่ใช้ไป",
oldClrType: typeof(double),
oldType: "double",
oldNullable: true,
oldComment: "จำนวนวันลาที่ใช้ไป");
migrationBuilder.AlterColumn<int>(
name: "LeaveCount",
table: "LeaveBeginnings",
type: "int",
nullable: false,
defaultValue: 0,
comment: "จำนวนครั้งที่ลาสะสม",
oldClrType: typeof(int),
oldType: "int",
oldNullable: true,
oldComment: "จำนวนครั้งที่ลาสะสม");
}
}
}

View file

@ -192,7 +192,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<int>("LeaveCount")
b.Property<int?>("LeaveCount")
.HasColumnType("int")
.HasComment("จำนวนครั้งที่ลาสะสม");
@ -200,7 +200,7 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
.HasColumnType("double")
.HasComment("จำนวนวันลาทั้งหมด");
b.Property<double>("LeaveDaysUsed")
b.Property<double?>("LeaveDaysUsed")
.HasColumnType("double")
.HasComment("จำนวนวันลาที่ใช้ไป");