แก้ไข /leave/user/check

เพิ่ม range and rangeEnd เพื่อตรวจสอบการลา เพื่อให้สามารถลาครึ่งวัน รวมกับลาเต็มวันได้
This commit is contained in:
Suphonchai Phoonsawat 2025-04-22 10:39:17 +07:00
parent cd54079a47
commit 3659d03d94
6 changed files with 1590 additions and 3 deletions

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,56 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
{
/// <inheritdoc />
public partial class AddLeaveRangeEnd : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "LeaveRange",
table: "LeaveRequests",
type: "longtext",
nullable: true,
comment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
migrationBuilder.AddColumn<string>(
name: "LeaveRangeEnd",
table: "LeaveRequests",
type: "longtext",
nullable: true,
comment: "ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "LeaveRangeEnd",
table: "LeaveRequests");
migrationBuilder.AlterColumn<string>(
name: "LeaveRange",
table: "LeaveRequests",
type: "longtext",
nullable: true,
comment: "ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย",
oldClrType: typeof(string),
oldType: "longtext",
oldNullable: true,
oldComment: "ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย")
.Annotation("MySql:CharSet", "utf8mb4")
.OldAnnotation("MySql:CharSet", "utf8mb4");
}
}
}

View file

@ -466,7 +466,11 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
b.Property<string>("LeaveRange")
.HasColumnType("longtext")
.HasComment("ช่วงของการลา เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย");
.HasComment("ช่วงของการลาของวันเริ่ม เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย");
b.Property<string>("LeaveRangeEnd")
.HasColumnType("longtext")
.HasComment("ช่วงของการลาของวันสิ้นสุด เช่น ลาทั้งวัน ครึ่งวันเช้า ครึ่งวันบ่าย");
b.Property<int?>("LeaveSalary")
.HasColumnType("int");