using System.Text.Json.Serialization; using TakeoutSaaS.Domain.Tenants.Enums; using TakeoutSaaS.Shared.Abstractions.Serialization; namespace TakeoutSaaS.Application.App.Tenants.Dto; /// /// 租户通知 DTO。 /// public sealed class TenantNotificationDto { /// /// 通知 ID(雪花算法,序列化为字符串)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long Id { get; init; } /// /// 租户 ID(雪花算法,序列化为字符串)。 /// [JsonConverter(typeof(SnowflakeIdJsonConverter))] public long TenantId { get; init; } /// /// 通知标题。 /// public string Title { get; init; } = string.Empty; /// /// 通知内容。 /// public string Message { get; init; } = string.Empty; /// /// 通道类型(如站内信、短信、邮件)。 /// public TenantNotificationChannel Channel { get; init; } /// /// 通知等级。 /// public TenantNotificationSeverity Severity { get; init; } /// /// 发送时间(UTC)。 /// public DateTime SentAt { get; init; } /// /// 阅读时间(UTC)。 /// public DateTime? ReadAt { get; init; } /// /// 附加元数据 JSON。 /// public string? MetadataJson { get; init; } }