You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
1.5 KiB
C#

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<Guid>, IAggregateRoot<Guid>
{
[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}";
}
}