Add LeaveCount column to LeaveBeginnings table

- Introduced a new column 'LeaveCount' of type int to the LeaveBeginnings table.
- Set default value to 0 and added a comment for clarity in Thai: "จำนวนครั้งที่ลาสะสม".
This commit is contained in:
Suphonchai Phoonsawat 2026-02-05 10:54:44 +07:00
parent 358fd47b99
commit 639d41649c
6 changed files with 1752 additions and 0 deletions

View file

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class AddLeaveCounttoLeaveBeginning : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<int>(
name: "LeaveCount",
table: "LeaveBeginnings",
type: "int",
nullable: false,
defaultValue: 0,
comment: "จำนวนครั้งที่ลาสะสม");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LeaveCount",
table: "LeaveBeginnings");
}
}
}

View file

@ -184,6 +184,10 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
.HasColumnOrder(102)
.HasComment("แก้ไขข้อมูลล่าสุดเมื่อ");
b.Property<int>("LeaveCount")
.HasColumnType("int")
.HasComment("จำนวนครั้งที่ลาสะสม");
b.Property<double>("LeaveDays")
.HasColumnType("double")
.HasComment("จำนวนวันลายกมา");