using System.ComponentModel.DataAnnotations;
using TakeoutSaaS.Domain.Dictionary.Enums;

namespace TakeoutSaaS.Infrastructure.App.Options;

/// <summary>
/// 字典分组种子配置。
/// </summary>
public sealed class DictionarySeedGroupOptions
{
    /// <summary>
    /// 所属租户，不填则使用默认租户或系统租户。
    /// </summary>
    public long? TenantId { get; set; }

    /// <summary>
    /// 分组编码。
    /// </summary>
    [Required]
    [MaxLength(64)]
    public string Code { get; set; } = string.Empty;

    /// <summary>
    /// 分组名称。
    /// </summary>
    [Required]
    [MaxLength(128)]
    public string Name { get; set; } = string.Empty;

    /// <summary>
    /// 分组作用域。
    /// </summary>
    public DictionaryScope Scope { get; set; } = DictionaryScope.Business;

    /// <summary>
    /// 描述信息。
    /// </summary>
    [MaxLength(512)]
    public string? Description { get; set; }

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

    /// <summary>
    /// 字典项集合。
    /// </summary>
    public List<DictionarySeedItemOptions> Items { get; set; } = new();
}
