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 12:39:28 +05:00
|
|
|
[Column("caption"), Comment("Название")]
|
2021-11-26 17:05:41 +05:00
|
|
|
[StringLength(255)]
|
2021-11-29 12:39:28 +05:00
|
|
|
public string Caption { get; set; }
|
|
|
|
|
|
|
|
[Column("type"), Comment("1-чтение, 2-запись, 3-чтение и запись")]
|
|
|
|
public int Type { get; set; }
|
|
|
|
|
|
|
|
[InverseProperty(nameof(RelationUserRolePermission.Permission))]
|
|
|
|
public virtual ICollection<RelationUserRolePermission> RelationUserRolesPermissions { get; set; }
|
2021-11-24 11:30:29 +05:00
|
|
|
}
|
|
|
|
}
|