feat: 租户账单公告通知接口
This commit is contained in:
@@ -91,4 +91,49 @@ internal static class TenantMapping
|
||||
FeaturePoliciesJson = package.FeaturePoliciesJson,
|
||||
IsActive = package.IsActive
|
||||
};
|
||||
|
||||
public static TenantBillingDto ToDto(this TenantBillingStatement bill)
|
||||
=> new()
|
||||
{
|
||||
Id = bill.Id,
|
||||
TenantId = bill.TenantId,
|
||||
StatementNo = bill.StatementNo,
|
||||
PeriodStart = bill.PeriodStart,
|
||||
PeriodEnd = bill.PeriodEnd,
|
||||
AmountDue = bill.AmountDue,
|
||||
AmountPaid = bill.AmountPaid,
|
||||
Status = bill.Status,
|
||||
DueDate = bill.DueDate,
|
||||
LineItemsJson = bill.LineItemsJson
|
||||
};
|
||||
|
||||
public static TenantAnnouncementDto ToDto(this TenantAnnouncement announcement, bool isRead, DateTime? readAt)
|
||||
=> new()
|
||||
{
|
||||
Id = announcement.Id,
|
||||
TenantId = announcement.TenantId,
|
||||
Title = announcement.Title,
|
||||
Content = announcement.Content,
|
||||
AnnouncementType = announcement.AnnouncementType,
|
||||
Priority = announcement.Priority,
|
||||
EffectiveFrom = announcement.EffectiveFrom,
|
||||
EffectiveTo = announcement.EffectiveTo,
|
||||
IsActive = announcement.IsActive,
|
||||
IsRead = isRead,
|
||||
ReadAt = readAt
|
||||
};
|
||||
|
||||
public static TenantNotificationDto ToDto(this TenantNotification notification)
|
||||
=> new()
|
||||
{
|
||||
Id = notification.Id,
|
||||
TenantId = notification.TenantId,
|
||||
Title = notification.Title,
|
||||
Message = notification.Message,
|
||||
Channel = notification.Channel,
|
||||
Severity = notification.Severity,
|
||||
SentAt = notification.SentAt,
|
||||
ReadAt = notification.ReadAt,
|
||||
MetadataJson = notification.MetadataJson
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user