2023-08-08 15:05:53 +07:00
|
|
|
|
using BMA.EHR.Domain.Models.Base;
|
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BMA.EHR.Domain.Models.Notifications
|
|
|
|
|
|
{
|
|
|
|
|
|
public class Inbox : EntityBase
|
|
|
|
|
|
{
|
|
|
|
|
|
[Required, MaxLength(200), Comment("หัวเรื่อง")]
|
|
|
|
|
|
public string Subject { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
|
|
|
|
|
|
public string Body { get; set; }
|
|
|
|
|
|
|
2024-05-21 14:31:29 +07:00
|
|
|
|
[Comment("รหัสผู้รับข้อความ")]
|
2023-08-08 15:05:53 +07:00
|
|
|
|
public Guid ReceiverUserId { get; set; }
|
|
|
|
|
|
|
2024-05-21 19:41:55 +07:00
|
|
|
|
public string? KeycloakUserId { get; set; }
|
2024-05-21 14:31:29 +07:00
|
|
|
|
|
2024-01-18 13:29:38 +07:00
|
|
|
|
[Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")]
|
2023-08-08 15:05:53 +07:00
|
|
|
|
public string Payload { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[Comment("เปิดอ่านแล้วหรือยัง")]
|
|
|
|
|
|
public bool IsOpen { get; set; } = false;
|
|
|
|
|
|
|
2024-01-18 13:29:38 +07:00
|
|
|
|
[Required, Comment("วันที่ได้รับ")]
|
2023-08-08 15:05:53 +07:00
|
|
|
|
public DateTime ReceiveDate { get; set; } = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
|
|
[Comment("วันที่เปิดอ่าน")]
|
|
|
|
|
|
public DateTime? OpenDate { get; set; }
|
2024-01-18 13:29:38 +07:00
|
|
|
|
|
|
|
|
|
|
[Comment("วันที่ลบข้อมูล")]
|
|
|
|
|
|
public DateTime? DeleteDate { get; set; }
|
2023-08-08 15:05:53 +07:00
|
|
|
|
}
|
|
|
|
|
|
}
|