Files
TakeoutSaaS.AdminApi/src/Application/TakeoutSaaS.Application/Dictionary/Models/DictionaryGroupDto.cs
2026-02-04 10:46:32 +08:00

74 lines
1.7 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
using System.Text.Json.Serialization;
using TakeoutSaaS.Domain.Dictionary.Enums;
using TakeoutSaaS.Shared.Abstractions.Serialization;
namespace TakeoutSaaS.Application.Dictionary.Models;
/// <summary>
/// 字典分组 DTO。
/// </summary>
public sealed class DictionaryGroupDto
{
/// <summary>
/// 分组 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long Id { get; init; }
/// <summary>
/// 分组编码。
/// </summary>
public string Code { get; init; } = string.Empty;
/// <summary>
/// 租户 ID。
/// </summary>
[JsonConverter(typeof(SnowflakeIdJsonConverter))]
public long TenantId { get; init; }
/// <summary>
/// 分组名称。
/// </summary>
public string Name { get; init; } = string.Empty;
/// <summary>
/// 字典作用域。
/// </summary>
public DictionaryScope Scope { get; init; }
/// <summary>
/// 描述。
/// </summary>
public string? Description { get; init; }
/// <summary>
/// 是否允许覆盖。
/// </summary>
public bool AllowOverride { get; init; }
/// <summary>
/// 是否启用。
/// </summary>
public bool IsEnabled { get; init; }
/// <summary>
/// 创建时间UTC
/// </summary>
public DateTime CreatedAt { get; init; }
/// <summary>
/// 更新时间UTC
/// </summary>
public DateTime? UpdatedAt { get; init; }
/// <summary>
/// 并发控制字段。
/// </summary>
public uint RowVersion { get; init; }
/// <summary>
/// 字典项集合。
/// </summary>
public IReadOnlyList<DictionaryItemDto> Items { get; init; } = Array.Empty<DictionaryItemDto>();
}