fix bug upload

api ออกคำสั่ง
ส่ง inbox and noti
This commit is contained in:
Suphonchai Phoonsawat 2023-08-08 15:05:53 +07:00
parent 9ff5725be4
commit c99cb5344e
11 changed files with 13843 additions and 4 deletions

View file

@ -0,0 +1,31 @@
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; }
[Required,Comment("รหัสผู้รับข้อความ")]
public Guid ReceiverUserId { 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; }
}
}

View file

@ -0,0 +1,31 @@
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; }
}
}