using System.ComponentModel.DataAnnotations; using System.Text.Json.Serialization; using TakeoutSaaS.Shared.Abstractions.Serialization; namespace TakeoutSaaS.Application.Dictionary.Contracts; /// /// 创建字典项请求。 /// public sealed class CreateDictionaryItemRequest { /// /// 所属分组 ID。 /// [Required] [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long GroupId { get; set; } /// /// 字典项键。 /// [Required, MaxLength(64)] public string Key { get; set; } = string.Empty; /// /// 字典项值。 /// [Required, MaxLength(256)] public string Value { get; set; } = string.Empty; /// /// 是否默认项。 /// public bool IsDefault { get; set; } /// /// 是否启用。 /// public bool IsEnabled { get; set; } = true; /// /// 排序值。 /// public int SortOrder { get; set; } = 100; /// /// 描述信息。 /// [MaxLength(512)] public string? Description { get; set; } }