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