Files
TakeoutSaaS.TenantApi/src/Application/TakeoutSaaS.Application/App/Tenants/Dto/TenantNotificationDto.cs

59 lines
1.5 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.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; }
}