Migrate เก็บฟิลด์ใช้แสดงในรายงานลาเพิ่ม #2195
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m18s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m18s
This commit is contained in:
parent
5ec7933b3c
commit
64c1021c52
7 changed files with 1708 additions and 0 deletions
|
|
@ -80,6 +80,8 @@ namespace BMA.EHR.Application.Responses.Profiles
|
|||
public string? CurrentZipCode { get; set; }
|
||||
|
||||
public string? PositionLeaveName { get; set; }
|
||||
|
||||
public string? PosExecutiveName { get; set; }
|
||||
|
||||
public string? CommanderPositionName { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,15 @@ namespace BMA.EHR.Domain.Models.Leave.Requests
|
|||
|
||||
public string PositionName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("ประเภทระดับตำแหน่ง")]
|
||||
public string PositionLevelName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("ตำแหน่งทางการบริหาร")]
|
||||
public string PosExecutiveName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("สังกัด")]
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
|
||||
[Comment("ตำแหน่งใต้ลายเช็นต์")]
|
||||
public string? PositionSign { get; set; } = string.Empty;
|
||||
|
||||
|
|
|
|||
1612
BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.Designer.cs
generated
Normal file
1612
BMA.EHR.Infrastructure/Migrations/LeaveDb/20260115140500_add_fields_table_eaveequestpprover.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,54 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class add_fields_table_eaveequestpprover : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OrganizationName",
|
||||
table: "LeaveRequestApprovers",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "สังกัด")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PosExecutiveName",
|
||||
table: "LeaveRequestApprovers",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ตำแหน่งทางการบริหาร")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "PositionLevelName",
|
||||
table: "LeaveRequestApprovers",
|
||||
type: "longtext",
|
||||
nullable: false,
|
||||
comment: "ประเภทระดับตำแหน่ง")
|
||||
.Annotation("MySql:CharSet", "utf8mb4");
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OrganizationName",
|
||||
table: "LeaveRequestApprovers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PosExecutiveName",
|
||||
table: "LeaveRequestApprovers");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "PositionLevelName",
|
||||
table: "LeaveRequestApprovers");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -727,6 +727,21 @@ namespace BMA.EHR.Infrastructure.Migrations.LeaveDb
|
|||
b.Property<Guid>("LeaveRequestId")
|
||||
.HasColumnType("char(36)");
|
||||
|
||||
b.Property<string>("OrganizationName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("สังกัด");
|
||||
|
||||
b.Property<string>("PosExecutiveName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ตำแหน่งทางการบริหาร");
|
||||
|
||||
b.Property<string>("PositionLevelName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext")
|
||||
.HasComment("ประเภทระดับตำแหน่ง");
|
||||
|
||||
b.Property<string>("PositionName")
|
||||
.IsRequired()
|
||||
.HasColumnType("longtext");
|
||||
|
|
|
|||
|
|
@ -160,6 +160,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
LastName = r.LastName,
|
||||
PositionName = r.PositionName,
|
||||
PositionSign = r.PositionSign,
|
||||
PosExecutiveName = r.PosExecutiveName,
|
||||
PositionLevelName = r.PositionLeaveName,
|
||||
OrganizationName = r.OrganizationName,
|
||||
ProfileId = r.ProfileId,
|
||||
KeycloakId = r.KeycloakId,
|
||||
ApproveStatus = "PENDING",
|
||||
|
|
@ -2034,6 +2037,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
ProfileId = profile.Id,
|
||||
KeycloakId = Guid.Parse(UserId!),
|
||||
ApproveType = "SENDER",
|
||||
PositionLevelName = profile.PositionLeaveName ?? "",
|
||||
PosExecutiveName = profile.PosExecutiveName ?? "",
|
||||
OrganizationName = profile.Oc ?? "",
|
||||
|
||||
CreatedFullName = FullName ?? "",
|
||||
CreatedUserId = UserId!,
|
||||
|
|
|
|||
|
|
@ -27,5 +27,15 @@ namespace BMA.EHR.Leave.Service.DTOs.LeaveRequest
|
|||
|
||||
[JsonProperty("keycloakId")]
|
||||
public Guid KeycloakId { get; set; } = Guid.Empty;
|
||||
|
||||
[JsonProperty("positionLeaveName")]
|
||||
public string PositionLeaveName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("posExecutiveName")]
|
||||
public string PosExecutiveName { get; set; } = string.Empty;
|
||||
|
||||
[JsonProperty("organizationName")]
|
||||
public string OrganizationName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue