2026-09-22 09:48:14 +00:00
|
|
|
using System;
|
2026-02-24 20:44:16 +00:00
|
|
|
using Volo.Abp.Domain.Entities.Auditing;
|
2026-09-22 09:48:14 +00:00
|
|
|
using Volo.Abp.MultiTenancy;
|
2026-02-24 20:44:16 +00:00
|
|
|
|
|
|
|
|
namespace Sozsoft.Notifications.Entities;
|
|
|
|
|
|
2026-09-22 09:48:14 +00:00
|
|
|
public class Notification : FullAuditedEntity<Guid>, IMultiTenant
|
2026-02-24 20:44:16 +00:00
|
|
|
{
|
2026-09-22 09:48:14 +00:00
|
|
|
public Guid? TenantId { get; set; }
|
|
|
|
|
|
2026-02-24 20:44:16 +00:00
|
|
|
public Guid NotificationRuleId { get; set; }
|
|
|
|
|
public required string NotificationChannel { get; set; }
|
2026-05-11 09:37:52 +00:00
|
|
|
public required Guid NotificationTypeId { get; set; }
|
|
|
|
|
public virtual NotificationType NotificationType { get; set; }
|
2026-02-24 20:44:16 +00:00
|
|
|
|
2026-09-22 09:48:14 +00:00
|
|
|
/// <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; }
|
|
|
|
|
|
2026-02-24 20:44:16 +00:00
|
|
|
// 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; }
|
|
|
|
|
|
2026-09-21 06:57:02 +00:00
|
|
|
/// <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; }
|
|
|
|
|
|
2026-02-24 20:44:16 +00:00
|
|
|
public bool IsSent { get; set; }
|
|
|
|
|
public bool IsRead { get; set; }
|
|
|
|
|
public DateTime? ReadTime { get; set; }
|
|
|
|
|
|
|
|
|
|
public virtual NotificationRule NotificationRule { get; set; }
|
|
|
|
|
}
|