2021-11-30 17:22:38 +05:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
{
|
|
|
|
[Table("t_permission_info"), Comment("Разрешения на доступ к данным")]
|
2021-12-01 17:10:17 +05:00
|
|
|
public class PermissionInfo : IId
|
2021-11-30 17:22:38 +05:00
|
|
|
{
|
|
|
|
[Key]
|
|
|
|
[Column("id")]
|
|
|
|
public int Id { get; set; }
|
|
|
|
|
|
|
|
[Column("name"), Comment("Название")]
|
|
|
|
[StringLength(255)]
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
[Column("description"), Comment("Краткое описание")]
|
|
|
|
[StringLength(255)]
|
|
|
|
public string Description { get; set; }
|
|
|
|
|
|
|
|
[Column("bit_description", TypeName = "jsonb"), Comment("Описание каждого бита разрешений")]
|
|
|
|
public IDictionary<int, string> BitDescription { get; set; }
|
|
|
|
|
|
|
|
[InverseProperty(nameof(Permission.PermissionInfo))]
|
|
|
|
public virtual ICollection<Permission> Permissions { get; set; }
|
|
|
|
}
|
|
|
|
}
|