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

namespace Atomx.Common.Entities
{
    /// <summary>
    /// 系统设置配置
    /// </summary>
    [Table("Settings")]
    public class Setting
    {
        /// <summary>
        /// 数据ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        [Key]
        public long Id { get; set; }

        /// <summary>
        /// 归属的网站应用Id
        /// </summary>
        public long SiteId { get; set; }

        /// <summary>
        /// 系统设置KEY
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Key { get; set; } = string.Empty;

        /// <summary>
        /// 配置类型,0 系统设置，
        /// </summary>
        public int Type { get; set; }

        /// <summary>
        /// 标题名称
        /// </summary>
        [Column(TypeName = "varchar(64)")]
        public string Name { get; set; } = string.Empty;

        /// <summary>
        /// 系统设置项
        /// </summary>
        [Column(TypeName = "text")]
        public string Content { get; set; } = string.Empty;
    }
}
