erp-platform/api/modules/Erp.Notifications/Erp.Notifications.Domain/Entities/NotificationRule.cs
2025-11-11 22:49:52 +03:00

26 lines
1,002 B
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;
using System.Collections.Generic;
using Volo.Abp.Domain.Entities.Auditing;
namespace Erp.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; } = [];
}