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.
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using JetBrains.Annotations;
|
|
using Volo.Abp.Domain.Entities;
|
|
|
|
namespace NPin.Framework.SettingManagement.Domain.Entities;
|
|
|
|
public class SettingEntity: Entity<Guid>, IAggregateRoot<Guid>
|
|
{
|
|
[NotNull]
|
|
public virtual string Name { get; protected set; }
|
|
|
|
[NotNull]
|
|
public virtual string Value { get; internal set; }
|
|
|
|
[CanBeNull]
|
|
public virtual string ProviderName { get; protected set; }
|
|
|
|
[CanBeNull]
|
|
public virtual string ProviderKey { get; protected set; }
|
|
|
|
public SettingEntity()
|
|
{
|
|
|
|
}
|
|
|
|
public SettingEntity(
|
|
Guid id,
|
|
[NotNull] string name,
|
|
[NotNull] string value,
|
|
[CanBeNull] string providerName = null,
|
|
[CanBeNull] string providerKey = null)
|
|
{
|
|
Check.NotNull(name, nameof(name));
|
|
Check.NotNull(value, nameof(value));
|
|
|
|
Id = id;
|
|
Name = name;
|
|
Value = value;
|
|
ProviderName = providerName;
|
|
ProviderKey = providerKey;
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"{base.ToString()}, Name = {Name}, Value = {Value}, ProviderName = {ProviderName}, ProviderKey = {ProviderKey}";
|
|
}
|
|
} |