using System.ComponentModel.DataAnnotations;
using SqlSugar;
using static EasyTemplate.Tool.Entity.PublicEnum;
namespace EasyTemplate.Tool.Entity;
///
/// 系统字典
///
[SugarTable(null, "系统字典")]
public class SystemDictionary : EntityBase
{
///
/// 键
///
[SugarColumn(ColumnDescription = "键", IsNullable = true)]
public string KeyName { get; set; }
///
/// 值
///
[SugarColumn(ColumnDescription = "值", IsNullable = true)]
public string ValueName { get; set; }
///
/// 类型
///
[SugarColumn(ColumnDescription = "字典类型", IsNullable = true)]
public string DicType { get; set; }
///
/// 是否为系统参数
///
[SugarColumn(ColumnDescription = "是否为系统参数,系统参数无法通过后台删除", DefaultValue ="0", IsNullable = true)]
public bool IsSystem { get; set; }
}
public class SystemDictionarySeedData : ISeedData
{
public IEnumerable Generate()
=>
[
new SystemDictionary() { Id = 1, KeyName="PublishKey", ValueName="asf234dasdfa234sdfa234565645sdfsdfadfgsdf",DicType="System", IsSystem=true, CreateTime = DateTime.Now },
new SystemDictionary() { Id = 2, KeyName="SecretKey", ValueName="bnvnvbndfdererere",DicType="System", IsSystem=true, CreateTime = DateTime.Now },
];
}