Add migration to create CheckInJobStatuses table for RMQ task control
- Introduced a new migration that creates the CheckInJobStatuses table. - The table includes fields for tracking job statuses, timestamps, user information, and error messages. - Supports various statuses such as PENDING, PROCESSING, COMPLETED, and FAILED.
This commit is contained in:
parent
3532df32fd
commit
a463df5716
12 changed files with 2259 additions and 126 deletions
|
|
@ -0,0 +1,39 @@
|
|||
using BMA.EHR.Domain.Models.Base;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace BMA.EHR.Domain.Models.Leave.TimeAttendants
|
||||
{
|
||||
public class CheckInJobStatus : EntityBase
|
||||
{
|
||||
[Required, Comment("Task ID สำหรับติดตามสถานะงาน")]
|
||||
public Guid TaskId { get; set; } = Guid.Empty;
|
||||
|
||||
[Required, Comment("รหัส User ของ Keycloak")]
|
||||
public Guid KeycloakUserId { get; set; } = Guid.Empty;
|
||||
|
||||
[Comment("วันเวลาที่สร้างงาน")]
|
||||
public DateTime CreatedDate { get; set; } = DateTime.Now;
|
||||
|
||||
[Comment("วันเวลาที่เริ่มประมวลผล")]
|
||||
public DateTime? ProcessingDate { get; set; }
|
||||
|
||||
[Comment("วันเวลาที่เสร็จสิ้นการประมวลผล")]
|
||||
public DateTime? CompletedDate { get; set; }
|
||||
|
||||
[Required, Comment("สถานะงาน: PENDING, PROCESSING, COMPLETED, FAILED")]
|
||||
public string Status { get; set; } = "PENDING";
|
||||
|
||||
[Comment("ประเภทการลงเวลา: CHECK_IN, CHECK_OUT")]
|
||||
public string? CheckType { get; set; }
|
||||
|
||||
[Comment("CheckInId สำหรับ Check-Out")]
|
||||
public Guid? CheckInId { get; set; }
|
||||
|
||||
[Comment("ข้อความแสดงข้อผิดพลาด")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
|
||||
[Comment("ข้อมูลเพิ่มเติม (JSON)")]
|
||||
public string? AdditionalData { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue