DD.WellWorkover.Cloud/AsbCloudDb/Model/Permission.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"), Comment("Разрешения на доступ к данным")]
public class Permission
{
[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 string BitDescription { get; set; }
[InverseProperty(nameof(RelationRolePermission.Permission))]
public virtual ICollection<RelationRolePermission> RelationUserRolesPermissions { get; set; }
}
}