using System.Text.Json.Serialization; using TakeoutSaaS.Domain.Dictionary.Enums; using TakeoutSaaS.Shared.Abstractions.Serialization; namespace TakeoutSaaS.Application.Dictionary.Models; /// /// 字典分组 DTO。 /// public sealed class DictionaryGroupDto { /// /// 分组 ID。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } /// /// 分组编码。 /// public string Code { get; init; } = string.Empty; /// /// 租户 ID。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long TenantId { get; init; } /// /// 分组名称。 /// public string Name { get; init; } = string.Empty; /// /// 字典作用域。 /// public DictionaryScope Scope { get; init; } /// /// 描述。 /// public string? Description { get; init; } /// /// 是否允许覆盖。 /// public bool AllowOverride { get; init; } /// /// 是否启用。 /// public bool IsEnabled { get; init; } /// /// 创建时间(UTC)。 /// public DateTime CreatedAt { get; init; } /// /// 更新时间(UTC)。 /// public DateTime? UpdatedAt { get; init; } /// /// 并发控制字段。 /// public uint RowVersion { get; init; } /// /// 字典项集合。 /// public IReadOnlyList Items { get; init; } = Array.Empty(); }