using TakeoutSaaS.Shared.Abstractions.Entities;

namespace TakeoutSaaS.Domain.Dictionary.Entities;

/// <summary>
/// 参数字典项。
/// </summary>
public sealed class DictionaryItem : MultiTenantEntityBase
{
    /// <summary>
    /// 关联分组 ID。
    /// </summary>
    public long GroupId { get; set; }

    /// <summary>
    /// 字典项键。
    /// </summary>
    public string Key { get; set; } = string.Empty;

    /// <summary>
    /// 字典项值。
    /// </summary>
    public string Value { get; set; } = string.Empty;

    /// <summary>
    /// 是否默认项。
    /// </summary>
    public bool IsDefault { get; set; }

    /// <summary>
    /// 是否启用。
    /// </summary>
    public bool IsEnabled { get; set; } = true;

    /// <summary>
    /// 排序值，越小越靠前。
    /// </summary>
    public int SortOrder { get; set; }

    /// <summary>
    /// 描述信息。
    /// </summary>
    public string? Description { get; set; }

    /// <summary>
    /// 导航属性：所属分组。
    /// </summary>
    public DictionaryGroup? Group { get; set; }
}
