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

namespace TakeoutSaaS.Application.Dictionary.Contracts;

/// <summary>
/// 创建字典分组请求。
/// </summary>
public sealed class CreateDictionaryGroupRequest
{
    /// <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>
    [Required]
    public DictionaryScope Scope { get; set; } = DictionaryScope.Business;

    /// <summary>
    /// 是否允许租户覆盖。
    /// </summary>
    public bool AllowOverride { get; set; }

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