using OASystem.Domain.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OASystem.Domain.Entities.System
{
    /// <summary>
    /// 系统消息 表
    /// </summary>
    [SugarTable("Sys_Message")]
    public class Sys_Message :EntityBase
    {
        /// <summary>
        /// 类型
        /// 0 
        /// 1 公告消息
        /// 2 团组流程管控消息
        /// 3 团组业务操作消息
        /// 4 费用审核消息
        /// 5 签证进度更新消息
        /// 6 任务进度更新消息
        /// </summary>
        [SugarColumn(IsNullable = true,ColumnDataType = "int")]
        public MessageTypeEnum Type { get; set; }

        /// <summary>
        /// 类型参数(json格式存储)
        /// 1 系统公告消息
        /// 2 团组流程管控消息
        /// 3 团组业务操作消息
        /// eg:PageId:104,Id:123,paramName:paramValue....
        /// 4 系统费用审核消息
        /// 5 签证进度更新消息
        /// 6 任务进度更新消息
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "varchar(200)")]
        public string? Param { get; set; }

        /// <summary>
        /// 发布者用户Id
        /// 4 管理员 Id 
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int IssuerId { get; set; } = 4;

        /// <summary>
        /// 团组Id,可为0
        /// </summary>
        [SugarColumn(IsNullable = true, ColumnDataType = "int")]
        public int DiId { get; set; } = 0;

        /// <summary>
        /// 消息标题
        /// </summary>
        [SugarColumn(IsNullable = true,ColumnDataType = "varchar(100)")]
        public string Title { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        [SugarColumn(IsNullable = true,ColumnDataType = "varchar(500)")]
        public string Content { get; set; }

        /// <summary>
        /// 发布时间
        /// </summary>
        [SugarColumn(IsNullable = true , ColumnDataType = "datetime")]
        public DateTime ReleaseTime { get; set; }
    }
}