sozsoft-platform/api/modules/Sozsoft.Notifications/Sozsoft.Notifications.Domain/Entities/NotificationRule.cs

27 lines
1,006 B
C#
Raw Normal View History

2026-02-24 20:44:16 +00:00
using System;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
namespace Sozsoft.Notifications.Entities;
public class NotificationRule : FullAuditedEntity<Guid>
{
public required string NotificationType { get; set; }
/// <summary>
/// Alıcı Tipi: User, Role, Organization, All, Custom
/// User ise RecipientId UserId olacak
/// Role ise RecipientId RoleId olacak
/// Organization ise RecipientId OrganizationUnitId olacak, o birimdeki herkese bildirim gider
/// All ise RecipientId'ye bakılmaz tüm kullanıcılara bildirim gider
/// </summary>
public required string RecipientType { get; set; }
public string? RecipientId { get; set; } //UserName, RoleName, OrganizationUnitCode
public required string Channel { get; set; }
public bool IsActive { get; set; }
public bool IsFixed { get; set; }
public bool IsCustomized { get; set; }
public virtual ICollection<Notification> Notifications { get; set; } = [];
}