hrms-api-backend/BMA.EHR.Domain/Models/Notifications/Notification.cs

34 lines
1.3 KiB
C#

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 Notification : EntityBase
{
[Required, Column(TypeName = "text"), Comment("รายละเอียดข้อความ")]
public string Body { get; set; }
[Required, Comment("รหัสผู้รับข้อความ")]
public Guid ReceiverUserId { get; set; }
[Required, Comment("ประเภทการแจ้งเตือน")]
public string Type { 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; }
}
}