using System.Text.Json.Serialization; using TakeoutSaaS.Shared.Abstractions.Serialization; namespace TakeoutSaaS.Application.Identity.Contracts; /// /// 权限 DTO。 /// public sealed class PermissionDto { /// /// 权限 ID(雪花,序列化为字符串)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } /// /// 租户 ID(固定权限时为基准租户)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long TenantId { get; init; } /// /// 父级权限 ID。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long ParentId { get; init; } /// /// 排序值,值越小越靠前。 /// public int SortOrder { get; init; } /// /// 权限类型(group/leaf)。 /// public string Type { get; init; } = string.Empty; /// /// 权限名称。 /// public string Name { get; init; } = string.Empty; /// /// 权限编码(全局唯一)。 /// public string Code { get; init; } = string.Empty; /// /// 描述。 /// public string? Description { get; init; } }