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