using System.ComponentModel.DataAnnotations; using SqlSugar; using static EasyTemplate.Tool.Entity.PublicEnum; namespace EasyTemplate.Tool.Entity; /// /// 系统基本设置 /// [SugarTable(null, "系统基本设置")] public class SystemSetting { /// /// Id /// [SugarColumn(ColumnName = "Id", ColumnDescription = "主键Id", IsIdentity = true, IsPrimaryKey = true)] public virtual long Id { get; set; } /// /// copyright /// [SugarColumn(ColumnDescription = "copyright", IsNullable = true)] public string CopyRight { get; set; } /// /// 公司名称 /// [SugarColumn(ColumnDescription = "公司名称", IsNullable = true)] public string CompanyName { get; set; } /// /// 公司名称 /// [SugarColumn(ColumnDescription = "社会统一信用代码", IsNullable = true)] public string CompanyNo { get; set; } /// /// 公司名称 /// [SugarColumn(ColumnDescription = "注册日期", IsNullable = true)] public DateTime RegisterDate { get; set; } /// /// 地区id /// [SugarColumn(ColumnDescription = "地区id", IsNullable = true)] public string AreaIds { get; set; } /// /// 地址 /// [SugarColumn(ColumnDescription = "地址", IsNullable = true)] public string Address { get; set; } /// /// 联系电话 /// [SugarColumn(ColumnDescription = "联系电话", IsNullable = true)] public string ContactPhone { get; set; } /// /// 联系邮箱 /// [SugarColumn(ColumnDescription = "联系邮箱", IsNullable = true)] public string ContactEmail { get; set; } /// /// 网站URL /// [SugarColumn(ColumnDescription = "网站URL", IsNullable = true)] public string WebsiteUrl { get; set; } /// /// 最后一个区域id,用于级联回显 /// [SugarColumn(IsIgnore = true)] public string LastAreadId { get; set; } /// /// 地区全拼 /// [SugarColumn(IsIgnore = true)] public string Area { get; set; } } public class SystemSettingSeedData : ISeedData { public IEnumerable Generate() => [ new SystemSetting() { Id = 1, CopyRight = "2025 Easy Template Blazor 后台管理系统", CompanyName = "示例公司", CompanyNo = "12345864848", RegisterDate = DateTime.Now, AreaIds="37,82,85", Address = "示例地址", ContactPhone = "123-456-7890", ContactEmail = "info@example.com", WebsiteUrl = "https://www.example.com" }, ]; }