เพิ่ม api สร้างคำสั่ง C-PM-18 ถึง C-PM-20
This commit is contained in:
parent
200e8eb5f6
commit
20ef0c5c09
7 changed files with 16216 additions and 2 deletions
|
|
@ -2085,6 +2085,315 @@ namespace BMA.EHR.Command.Service.Controllers
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region " C-PM-18 "
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-18
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPost("c-pm-18/detail")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostType18Async([FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
|
||||||
|
var inserted = new Domain.Models.Commands.Core.Command
|
||||||
|
{
|
||||||
|
CommandNo = req.orderNo,
|
||||||
|
CommandYear = req.orderYear.ToString(),
|
||||||
|
CommandSubject = req.orderTitle,
|
||||||
|
CommandTypeId = req.orderTypeValue,
|
||||||
|
IssuerOrganizationId = req.orderBy,
|
||||||
|
IssuerOrganizationName = req.orderByOrganizationName,
|
||||||
|
AuthorizedUserFullName = req.signatoryBy,
|
||||||
|
AuthorizedPosition = req.signatoryPosition,
|
||||||
|
|
||||||
|
CommandAffectDate = req.orderDate,
|
||||||
|
OwnerGovId = OcId,
|
||||||
|
|
||||||
|
Fault = req.fault,
|
||||||
|
GuiltyBasis = req.guiltyBasis,
|
||||||
|
ConclusionFireNo = req.conclusionFireNo,
|
||||||
|
ConclusionFireDate = req.conclusionFireDate,
|
||||||
|
ConclusionFireResolution = req.conclusionFireResolution,
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await _repository.AddAsync(inserted);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-18
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPut("c-pm-18/detail/{orderId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PutType18Async(Guid orderId, [FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var order = await _repository.GetByIdAsync(orderId);
|
||||||
|
if (order == null)
|
||||||
|
throw new Exception(GlobalMessages.CommandNotFound);
|
||||||
|
|
||||||
|
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||||
|
|
||||||
|
order.CommandNo = req.orderNo;
|
||||||
|
order.CommandYear = req.orderYear.ToString();
|
||||||
|
order.CommandSubject = req.orderTitle;
|
||||||
|
order.CommandType = commandType!;
|
||||||
|
order.IssuerOrganizationId = req.orderBy;
|
||||||
|
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||||
|
order.AuthorizedUserFullName = req.signatoryBy;
|
||||||
|
order.AuthorizedPosition = req.signatoryPosition;
|
||||||
|
order.CommandStatus = status!;
|
||||||
|
order.CommandAffectDate = req.orderDate;
|
||||||
|
|
||||||
|
order.Fault = req.fault;
|
||||||
|
order.GuiltyBasis = req.guiltyBasis;
|
||||||
|
order.ConclusionFireNo = req.conclusionFireNo;
|
||||||
|
order.ConclusionFireDate = req.conclusionFireDate;
|
||||||
|
order.ConclusionFireResolution = req.conclusionFireResolution;
|
||||||
|
|
||||||
|
var result = await _repository.UpdateAsync(order);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region " C-PM-19 "
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-19
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPost("c-pm-19/detail")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostType19Async([FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
|
||||||
|
var inserted = new Domain.Models.Commands.Core.Command
|
||||||
|
{
|
||||||
|
CommandNo = req.orderNo,
|
||||||
|
CommandYear = req.orderYear.ToString(),
|
||||||
|
CommandSubject = req.orderTitle,
|
||||||
|
CommandTypeId = req.orderTypeValue,
|
||||||
|
IssuerOrganizationId = req.orderBy,
|
||||||
|
IssuerOrganizationName = req.orderByOrganizationName,
|
||||||
|
AuthorizedUserFullName = req.signatoryBy,
|
||||||
|
AuthorizedPosition = req.signatoryPosition,
|
||||||
|
|
||||||
|
CommandAffectDate = req.orderDate,
|
||||||
|
OwnerGovId = OcId,
|
||||||
|
|
||||||
|
Fault = req.fault,
|
||||||
|
GuiltyBasis = req.guiltyBasis,
|
||||||
|
ConclusionFireNo = req.conclusionFireNo,
|
||||||
|
ConclusionFireDate = req.conclusionFireDate,
|
||||||
|
ConclusionFireResolution = req.conclusionFireResolution,
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await _repository.AddAsync(inserted);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-19
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPut("c-pm-19/detail/{orderId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PutType19Async(Guid orderId, [FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var order = await _repository.GetByIdAsync(orderId);
|
||||||
|
if (order == null)
|
||||||
|
throw new Exception(GlobalMessages.CommandNotFound);
|
||||||
|
|
||||||
|
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||||
|
|
||||||
|
order.CommandNo = req.orderNo;
|
||||||
|
order.CommandYear = req.orderYear.ToString();
|
||||||
|
order.CommandSubject = req.orderTitle;
|
||||||
|
order.CommandType = commandType!;
|
||||||
|
order.IssuerOrganizationId = req.orderBy;
|
||||||
|
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||||
|
order.AuthorizedUserFullName = req.signatoryBy;
|
||||||
|
order.AuthorizedPosition = req.signatoryPosition;
|
||||||
|
order.CommandStatus = status!;
|
||||||
|
order.CommandAffectDate = req.orderDate;
|
||||||
|
|
||||||
|
order.Fault = req.fault;
|
||||||
|
order.GuiltyBasis = req.guiltyBasis;
|
||||||
|
order.ConclusionFireNo = req.conclusionFireNo;
|
||||||
|
order.ConclusionFireDate = req.conclusionFireDate;
|
||||||
|
order.ConclusionFireResolution = req.conclusionFireResolution;
|
||||||
|
|
||||||
|
var result = await _repository.UpdateAsync(order);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region " C-PM-20 "
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-22 : สร้างข้อมูลรายละเอียดการออกคำสั่ง C-PM-20
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPost("c-pm-20/detail")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PostType20Async([FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
|
||||||
|
var inserted = new Domain.Models.Commands.Core.Command
|
||||||
|
{
|
||||||
|
CommandNo = req.orderNo,
|
||||||
|
CommandYear = req.orderYear.ToString(),
|
||||||
|
CommandSubject = req.orderTitle,
|
||||||
|
CommandTypeId = req.orderTypeValue,
|
||||||
|
IssuerOrganizationId = req.orderBy,
|
||||||
|
IssuerOrganizationName = req.orderByOrganizationName,
|
||||||
|
AuthorizedUserFullName = req.signatoryBy,
|
||||||
|
AuthorizedPosition = req.signatoryPosition,
|
||||||
|
|
||||||
|
CommandAffectDate = req.orderDate,
|
||||||
|
OwnerGovId = OcId,
|
||||||
|
|
||||||
|
Fault = req.fault,
|
||||||
|
GuiltyBasis = req.guiltyBasis,
|
||||||
|
ConclusionFireNo = req.conclusionFireNo,
|
||||||
|
ConclusionFireDate = req.conclusionFireDate,
|
||||||
|
ConclusionFireResolution = req.conclusionFireResolution,
|
||||||
|
};
|
||||||
|
|
||||||
|
var result = await _repository.AddAsync(inserted);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PM7-23 : แก้ไขข้อมูลรายละเอียดการออกคำสั่ง C-PM-20
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orderId">Record Id ของคำสั่ง</param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <response code="200">เมื่อทำการอ่านข้อมูลจาก Relational Database สำเร็จ</response>
|
||||||
|
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||||
|
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||||
|
[HttpPut("c-pm-20/detail/{orderId}")]
|
||||||
|
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||||
|
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||||
|
public async Task<ActionResult<ResponseObject>> PutType20Async(Guid orderId, [FromBody] CreateCommandGroup11Request req)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var order = await _repository.GetByIdAsync(orderId);
|
||||||
|
if (order == null)
|
||||||
|
throw new Exception(GlobalMessages.CommandNotFound);
|
||||||
|
|
||||||
|
|
||||||
|
var commandType = await _commandTypeRepository.GetByIdAsync(req.orderTypeValue);
|
||||||
|
var status = await _commandStatusRepository.GetByIdAsync(order.CommandStatusId);
|
||||||
|
|
||||||
|
order.CommandNo = req.orderNo;
|
||||||
|
order.CommandYear = req.orderYear.ToString();
|
||||||
|
order.CommandSubject = req.orderTitle;
|
||||||
|
order.CommandType = commandType!;
|
||||||
|
order.IssuerOrganizationId = req.orderBy;
|
||||||
|
order.IssuerOrganizationName = req.orderByOrganizationName;
|
||||||
|
order.AuthorizedUserFullName = req.signatoryBy;
|
||||||
|
order.AuthorizedPosition = req.signatoryPosition;
|
||||||
|
order.CommandStatus = status!;
|
||||||
|
order.CommandAffectDate = req.orderDate;
|
||||||
|
|
||||||
|
order.Fault = req.fault;
|
||||||
|
order.GuiltyBasis = req.guiltyBasis;
|
||||||
|
order.ConclusionFireNo = req.conclusionFireNo;
|
||||||
|
order.ConclusionFireDate = req.conclusionFireDate;
|
||||||
|
order.ConclusionFireResolution = req.conclusionFireResolution;
|
||||||
|
|
||||||
|
var result = await _repository.UpdateAsync(order);
|
||||||
|
|
||||||
|
return Success(result);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
namespace BMA.EHR.Command.Service.Requests
|
||||||
|
{
|
||||||
|
public class CreateCommandGroup11Request
|
||||||
|
{
|
||||||
|
public Guid orderTypeValue { get; set; }
|
||||||
|
|
||||||
|
public string orderTitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string orderNo { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public int orderYear { get; set; }
|
||||||
|
|
||||||
|
public DateTime orderDate { get; set; }
|
||||||
|
|
||||||
|
public Guid orderBy { get; set; }
|
||||||
|
|
||||||
|
public string orderByOrganizationName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string signatoryBy { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string signatoryPosition { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public string fault { get; set; }
|
||||||
|
|
||||||
|
public string guiltyBasis { get; set; }
|
||||||
|
|
||||||
|
public string conclusionFireNo { get; set; }
|
||||||
|
|
||||||
|
public DateTime conclusionFireDate { get; set; }
|
||||||
|
|
||||||
|
public string conclusionFireResolution { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -163,12 +163,33 @@ namespace BMA.EHR.Domain.Models.Commands.Core
|
||||||
|
|
||||||
#region " C-PM-16 "
|
#region " C-PM-16 "
|
||||||
|
|
||||||
|
[Comment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)")]
|
||||||
public string? GovAidCommandNo { get; set; }
|
public string? GovAidCommandNo { get; set; }
|
||||||
|
|
||||||
|
[Comment("ลงวันที่ (คำสั่งช่วยราชการ)")]
|
||||||
public DateTime? GovAidCommandDate { get; set; }
|
public DateTime? GovAidCommandDate { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region " C-PM-18, C-PM-19 and C-PM-20 "
|
||||||
|
|
||||||
|
[Comment("รายละเอียดการกระทำผิด")]
|
||||||
|
public string? Fault { get; set; }
|
||||||
|
|
||||||
|
[Comment("ฐานความผิด")]
|
||||||
|
public string? GuiltyBasis { get; set; }
|
||||||
|
|
||||||
|
[Comment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)")]
|
||||||
|
public string? ConclusionFireNo { get; set; }
|
||||||
|
|
||||||
|
[Comment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)")]
|
||||||
|
public DateTime? ConclusionFireDate { get; set; }
|
||||||
|
|
||||||
|
[Comment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)")]
|
||||||
|
public string? ConclusionFireResolution { get; set; }
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
public virtual List<CommandDocument> Documents { get; set; } = new();
|
public virtual List<CommandDocument> Documents { get; set; } = new();
|
||||||
|
|
||||||
public virtual List<CommandReceiver> Receivers { get; set; }
|
public virtual List<CommandReceiver> Receivers { get; set; }
|
||||||
|
|
|
||||||
15707
BMA.EHR.Infrastructure/Migrations/20230825073352_Add field For CommandType 18-20.Designer.cs
generated
Normal file
15707
BMA.EHR.Infrastructure/Migrations/20230825073352_Add field For CommandType 18-20.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1,122 @@
|
||||||
|
using System;
|
||||||
|
using Microsoft.EntityFrameworkCore.Migrations;
|
||||||
|
|
||||||
|
#nullable disable
|
||||||
|
|
||||||
|
namespace BMA.EHR.Infrastructure.Migrations
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
public partial class AddfieldForCommandType1820 : Migration
|
||||||
|
{
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "GovAidCommandNo",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "คำสั่งเลขที่ (คำสั่งช่วยราชการ)",
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true)
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
|
name: "GovAidCommandDate",
|
||||||
|
table: "Commands",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ลงวันที่ (คำสั่งช่วยราชการ)",
|
||||||
|
oldClrType: typeof(DateTime),
|
||||||
|
oldType: "datetime(6)",
|
||||||
|
oldNullable: true);
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<DateTime>(
|
||||||
|
name: "ConclusionFireDate",
|
||||||
|
table: "Commands",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ลงวันที่ (เรื่องการดำเนินการทางวินัย)");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ConclusionFireNo",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ครั้งที่ (เรื่องการดำเนินการทางวินัย)")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "ConclusionFireResolution",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "มติที่ประชุม (เรื่องการดำเนินการทางวินัย)")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "Fault",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "รายละเอียดการกระทำผิด")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AddColumn<string>(
|
||||||
|
name: "GuiltyBasis",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
comment: "ฐานความผิด")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void Down(MigrationBuilder migrationBuilder)
|
||||||
|
{
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ConclusionFireDate",
|
||||||
|
table: "Commands");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ConclusionFireNo",
|
||||||
|
table: "Commands");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "ConclusionFireResolution",
|
||||||
|
table: "Commands");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "Fault",
|
||||||
|
table: "Commands");
|
||||||
|
|
||||||
|
migrationBuilder.DropColumn(
|
||||||
|
name: "GuiltyBasis",
|
||||||
|
table: "Commands");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<string>(
|
||||||
|
name: "GovAidCommandNo",
|
||||||
|
table: "Commands",
|
||||||
|
type: "longtext",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(string),
|
||||||
|
oldType: "longtext",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "คำสั่งเลขที่ (คำสั่งช่วยราชการ)")
|
||||||
|
.Annotation("MySql:CharSet", "utf8mb4")
|
||||||
|
.OldAnnotation("MySql:CharSet", "utf8mb4");
|
||||||
|
|
||||||
|
migrationBuilder.AlterColumn<DateTime>(
|
||||||
|
name: "GovAidCommandDate",
|
||||||
|
table: "Commands",
|
||||||
|
type: "datetime(6)",
|
||||||
|
nullable: true,
|
||||||
|
oldClrType: typeof(DateTime),
|
||||||
|
oldType: "datetime(6)",
|
||||||
|
oldNullable: true,
|
||||||
|
oldComment: "ลงวันที่ (คำสั่งช่วยราชการ)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -80,6 +80,18 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.HasColumnType("varchar(4)")
|
.HasColumnType("varchar(4)")
|
||||||
.HasComment("ปีที่ออกคำสั่ง");
|
.HasComment("ปีที่ออกคำสั่ง");
|
||||||
|
|
||||||
|
b.Property<DateTime?>("ConclusionFireDate")
|
||||||
|
.HasColumnType("datetime(6)")
|
||||||
|
.HasComment("ลงวันที่ (เรื่องการดำเนินการทางวินัย)");
|
||||||
|
|
||||||
|
b.Property<string>("ConclusionFireNo")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ครั้งที่ (เรื่องการดำเนินการทางวินัย)");
|
||||||
|
|
||||||
|
b.Property<string>("ConclusionFireResolution")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("มติที่ประชุม (เรื่องการดำเนินการทางวินัย)");
|
||||||
|
|
||||||
b.Property<DateTime?>("ConclusionMeetingDate")
|
b.Property<DateTime?>("ConclusionMeetingDate")
|
||||||
.HasColumnType("datetime(6)")
|
.HasColumnType("datetime(6)")
|
||||||
.HasComment("การประชุม ลงวันที่");
|
.HasComment("การประชุม ลงวันที่");
|
||||||
|
|
@ -139,11 +151,21 @@ namespace BMA.EHR.Infrastructure.Migrations
|
||||||
.HasColumnOrder(101)
|
.HasColumnOrder(101)
|
||||||
.HasComment("User Id ที่สร้างข้อมูล");
|
.HasComment("User Id ที่สร้างข้อมูล");
|
||||||
|
|
||||||
|
b.Property<string>("Fault")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("รายละเอียดการกระทำผิด");
|
||||||
|
|
||||||
b.Property<DateTime?>("GovAidCommandDate")
|
b.Property<DateTime?>("GovAidCommandDate")
|
||||||
.HasColumnType("datetime(6)");
|
.HasColumnType("datetime(6)")
|
||||||
|
.HasComment("ลงวันที่ (คำสั่งช่วยราชการ)");
|
||||||
|
|
||||||
b.Property<string>("GovAidCommandNo")
|
b.Property<string>("GovAidCommandNo")
|
||||||
.HasColumnType("longtext");
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("คำสั่งเลขที่ (คำสั่งช่วยราชการ)");
|
||||||
|
|
||||||
|
b.Property<string>("GuiltyBasis")
|
||||||
|
.HasColumnType("longtext")
|
||||||
|
.HasComment("ฐานความผิด");
|
||||||
|
|
||||||
b.Property<Guid>("IssuerOrganizationId")
|
b.Property<Guid>("IssuerOrganizationId")
|
||||||
.HasColumnType("char(36)")
|
.HasColumnType("char(36)")
|
||||||
|
|
|
||||||
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue