2023-07-07 16:26:16 +05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model;
|
|
|
|
|
|
|
|
[Table("t_notification_category"), Comment("Категории уведомлений")]
|
|
|
|
public class NotificationCategory : IId
|
|
|
|
{
|
2023-12-19 12:28:41 +05:00
|
|
|
#region constants category notifications ids
|
|
|
|
/// <summary>
|
|
|
|
/// СИСТЕМНЫЕ УВЕДОМЛЕНИЯ
|
|
|
|
/// </summary>
|
|
|
|
public const int IdSystemNotificationCategory = 1;
|
|
|
|
|
|
|
|
[Key]
|
2023-07-07 16:26:16 +05:00
|
|
|
[Column("id")]
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
[Column("name")]
|
|
|
|
public string Name { get; set; } = null!;
|
|
|
|
|
|
|
|
[InverseProperty(nameof(Notification.NotificationCategory))]
|
|
|
|
public virtual ICollection<Notification> Notifications { get; set; } = null!;
|
|
|
|
}
|