sozsoft-platform/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain/Entities/Notification.cs
2026-09-22 12:48:14 +03:00

40 lines
1.5 KiB
C#

using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.MultiTenancy;
namespace Sozsoft.Notifications.Entities;
public class Notification : FullAuditedEntity<Guid>, IMultiTenant
{
public Guid? TenantId { get; set; }
public Guid NotificationRuleId { get; set; }
public required string NotificationChannel { get; set; }
public required Guid NotificationTypeId { get; set; }
public virtual NotificationType NotificationType { get; set; }
/// <summary>
/// Metni hangi sablondan geldigi; elle gonderimde secilirse yazilir, kural motorundan gecen
/// bildirimlerde bostur. Navigasyon yoktur: sablon uygulamanin entity'sidir
/// (<c>Adm_T_NotificationTemplate</c>), bildirim modulu ona referans veremez.
/// </summary>
public Guid? NotificationTemplateId { get; set; }
// Bildirim tipine göre bildirimi alacak olan hedef bilgisini içerir
public required string Identifier { get; set; } //UserId, Email, PhoneNumber..
public Guid? UserId { get; set; }
public required string Message { get; set; }
/// <summary>
/// Mail kanalinin konu satiri. Bos ise <c>NotificationWorker</c> konuyu bildirim tipinin
/// adindan uretir; kural motorundan gecen bildirimlerde bos kalir, manuel gonderimde
/// ekrandan ya da sablondan gelir.
/// </summary>
public string? Subject { get; set; }
public bool IsSent { get; set; }
public bool IsRead { get; set; }
public DateTime? ReadTime { get; set; }
public virtual NotificationRule NotificationRule { get; set; }
}