- 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.
39 lines
1.6 KiB
C#
39 lines
1.6 KiB
C#
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; }
|
|
}
|
|
}
|