Migrate add field PlacementReceives.rank #2469
All checks were successful
Build & Deploy Placement Service / build (push) Successful in 1m44s

This commit is contained in:
harid 2026-05-12 14:59:22 +07:00
parent 20e8dfddd6
commit 0365fad723
7 changed files with 21298 additions and 2 deletions

View file

@ -64,6 +64,10 @@ namespace BMA.EHR.Domain.Models.Placement
public string? profileId { get; set; } public string? profileId { get; set; }
[Comment("คำนำหน้า")] [Comment("คำนำหน้า")]
public string? prefix { get; set; } public string? prefix { get; set; }
[Comment("ยศ")]
public string? rank { get; set; }
[Comment("ชื่อ")] [Comment("ชื่อ")]
public string? firstName { get; set; } public string? firstName { get; set; }
[Comment("นามสกุล")] [Comment("นามสกุล")]

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace BMA.EHR.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class update_PlacementReceives_add_rank : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "rank",
table: "PlacementReceives",
type: "longtext",
nullable: true,
comment: "ยศ")
.Annotation("MySql:CharSet", "utf8mb4");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "rank",
table: "PlacementReceives");
}
}
}

View file

@ -13693,6 +13693,10 @@ namespace BMA.EHR.Infrastructure.Migrations
.HasColumnType("longtext") .HasColumnType("longtext")
.HasComment("profile Id"); .HasComment("profile Id");
b.Property<string>("rank")
.HasColumnType("longtext")
.HasComment("ยศ");
b.Property<string>("root") b.Property<string>("root")
.HasColumnType("longtext") .HasColumnType("longtext")
.HasComment("ชื่อหน่วยงาน root"); .HasComment("ชื่อหน่วยงาน root");

View file

@ -129,6 +129,7 @@ namespace BMA.EHR.Placement.Service.Controllers
{ {
p.Id, p.Id,
p.prefix, p.prefix,
p.rank,
p.firstName, p.firstName,
p.lastName, p.lastName,
p.citizenId, p.citizenId,
@ -280,6 +281,7 @@ namespace BMA.EHR.Placement.Service.Controllers
// ProfileId = p.Profile.Id, // ProfileId = p.Profile.Id,
p.citizenId, p.citizenId,
p.prefix, p.prefix,
p.rank,
p.firstName, p.firstName,
p.lastName, p.lastName,
p.DateOfBirth, p.DateOfBirth,
@ -377,6 +379,7 @@ namespace BMA.EHR.Placement.Service.Controllers
// data.ProfileId, // data.ProfileId,
data.citizenId, data.citizenId,
data.prefix, data.prefix,
data.rank,
data.firstName, data.firstName,
data.lastName, data.lastName,
data.DateOfBirth, data.DateOfBirth,
@ -484,6 +487,7 @@ namespace BMA.EHR.Placement.Service.Controllers
// Profile = profile, // Profile = profile,
citizenId = req.citizenId, citizenId = req.citizenId,
prefix = req.prefix, prefix = req.prefix,
rank = req.rank,
firstName = req.firstName, firstName = req.firstName,
lastName = req.lastName, lastName = req.lastName,
DateOfBirth = req.BirthDate, DateOfBirth = req.BirthDate,
@ -852,6 +856,7 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.Gender = req.Gender; uppdated.Gender = req.Gender;
uppdated.citizenId = req.citizenId; uppdated.citizenId = req.citizenId;
uppdated.prefix = req.prefix; uppdated.prefix = req.prefix;
uppdated.rank = req.rank;
uppdated.firstName = req.firstName; uppdated.firstName = req.firstName;
uppdated.lastName = req.lastName; uppdated.lastName = req.lastName;
uppdated.DateOfBirth = req.DateOfBirth; uppdated.DateOfBirth = req.DateOfBirth;

View file

@ -6,7 +6,8 @@ namespace BMA.EHR.Placement.Service.Requests
public class PlacementReceiveEditRequest public class PlacementReceiveEditRequest
{ {
public string citizenId { get; set; } public string citizenId { get; set; }
public string prefix { get; set; } public string? prefix { get; set; }
public string? rank { get; set; }
public string firstName { get; set; } public string firstName { get; set; }
public string lastName { get; set; } public string lastName { get; set; }
public DateTime DateOfBirth { get; set; } public DateTime DateOfBirth { get; set; }

View file

@ -6,7 +6,9 @@ namespace BMA.EHR.Placement.Service.Requests
public class PlacementReceiveRequest public class PlacementReceiveRequest
{ {
public string citizenId { get; set; } public string citizenId { get; set; }
public string prefix { get; set; }
public string? prefix { get; set; }
public string? rank { get; set; }
public string firstName { get; set; } public string firstName { get; set; }
public string lastName { get; set; } public string lastName { get; set; }
public DateTime BirthDate { get; set; } public DateTime BirthDate { get; set; }