using JetBrains.Annotations; using SqlSugar; using Volo.Abp.Domain.Entities; using Check = Volo.Abp.Check; namespace NPin.Framework.SettingManagement.Domain.Entities; [SugarTable("SysSetting", "系统配置表")] public class SettingEntity : Entity, IAggregateRoot { [SugarColumn(IsPrimaryKey = true)] public override Guid Id { get; protected set; } [SugarColumn(ColumnDescription = "配置名称")] public string Name { get; protected set; } [SugarColumn(ColumnDescription = "配置值", ColumnDataType = StaticConfig.CodeFirst_BigString)] public string Value { get; internal set; } [SugarColumn(ColumnDescription = "配置提供者")] public string? ProviderName { get; protected set; } [SugarColumn(ColumnDescription = "配置提供者Key")] public string? ProviderKey { get; protected set; } public SettingEntity() { } public SettingEntity( string name, string value, string? providerName = null, string? providerKey = null) { Check.NotNull(name, nameof(name)); Check.NotNull(value, nameof(value)); Name = name; Value = value; ProviderName = providerName; ProviderKey = providerKey; } public override string ToString() { return $"{base.ToString()}, Name = {Name}, Value = {Value}, ProviderName = {ProviderName}, ProviderKey = {ProviderKey}"; } }