using Hotline.Share.Enums.Settings;
using SqlSugar;
using System.ComponentModel;
using XF.Domain.Repository;
using XF.Utility.EnumExtensions;

namespace Hotline.Settings.CommonOpinions
{
	[Description("惯用语")]
	public class SystemCommonOpinion : CreationEntity
    {
	    [SugarColumn(ColumnDataType = "text")]
		public string Content { get; set; }

        public int OrderBy { get; set; }

        [SugarColumn(DefaultValue = "f")]
        public bool IsOpen { get; set; }

        public ECommonType CommonType { get; set; }

        /// <summary>
        /// 归属类型
        /// </summary>
        public ECommonAttributionType? AttributionType { get; set; }

        /// <summary>
        /// 老系统Id
        /// </summary>
        public string? OldId { get; set; }

		[SugarColumn(IsIgnore = true)]
        public string CommonTypeText => CommonType.GetDescription();
    }
}
