using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 系统消息模版
    /// </summary>
    [Table("MessageTemplates")]
    public class MessageTemplate
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 消息模板类型
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 信息模板KEY
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Key { get; set; } = string.Empty;

        /// <summary>
        /// 消息模板名称
        /// </summary>
        [Column(TypeName = "varchar(256)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 消息标题
        /// </summary>
        [Column(TypeName = "varchar(256)")]
        public string Title { get; set; } = string.Empty;

        /// <summary>
        /// 消息内容
        /// </summary>
        [Column(TypeName = "text")]
        public string Body { get; set; } = string.Empty;

        /// <summary>
        /// 是否可用
        /// </summary>
        public bool Enabled { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Column(TypeName = "timestamptz")]
        public DateTime? UpdateTime { get; set; }
    }
}
