DD.WellWorkover.Cloud/AsbCloudDb/Model/PermissionInfo.cs

29 lines
1.0 KiB
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_permission_info"), Comment("Разрешения на доступ к данным")]
public class PermissionInfo
{
[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; }
}
}