using System.ComponentModel;
using Hotline.Users;
using SqlSugar;
using XF.Domain.Entities;
using XF.Domain.Repository;

namespace Hotline.Settings
{
    [Description("系统参数")]
    public class SystemSetting:CreationEntity
    {
        /// <summary>
        /// 编码
        /// </summary>
        public string Code { get; set; }

        /// <summary>
        /// 配置名称
        /// </summary>
        public string SettingName { get; set; }

        /// <summary>
        /// 值
        /// </summary>
        [SugarColumn(ColumnDataType = "json", IsJson = true, IsNullable = true)]
        public List<string> SettingValue { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }

        /// <summary>
        /// 说明
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Remark { get; set; }

        /// <summary>
        /// 创建人
        /// </summary>
        [Navigate(NavigateType.OneToOne,nameof(CreatorId))]
        public User? Creator { get; set; }

    }
}
