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; } [Comment("รหัสผู้รับข้อความ")] public Guid ReceiverUserId { get; set; } public string? KeycloakUserId { get; set; } [Column(TypeName = "text"), Comment("สิงที่แนบมาด้วย")] public string Payload { get; set; } [Comment("เปิดอ่านแล้วหรือยัง")] public bool IsOpen { get; set; } = false; [Required, Comment("วันที่ได้รับ")] public DateTime ReceiveDate { get; set; } = DateTime.Now; [Comment("วันที่เปิดอ่าน")] public DateTime? OpenDate { get; set; } [Comment("วันที่ลบข้อมูล")] public DateTime? DeleteDate { get; set; } } }