2021-11-29 12:39:28 +05:00
|
|
|
using Microsoft.EntityFrameworkCore;
|
2021-11-24 11:30:29 +05:00
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
|
namespace AsbCloudDb.Model
|
|
|
|
{
|
2021-11-30 17:22:38 +05:00
|
|
|
[Table("t_permission"), Comment("Отношение ролей пользователей и разрешений доступа")]
|
2021-11-24 11:30:29 +05:00
|
|
|
public class Permission
|
|
|
|
{
|
2021-11-30 17:22:38 +05:00
|
|
|
[Column("id_user_role")]
|
2021-12-01 16:09:06 +05:00
|
|
|
public int IdUserRole { get; set; }
|
2021-11-30 17:22:38 +05:00
|
|
|
|
2021-12-11 16:46:04 +05:00
|
|
|
[Column("id_permission_info")]
|
|
|
|
public int IdPermissionInfo { get; set; }
|
2021-11-29 12:39:28 +05:00
|
|
|
|
2021-12-11 16:46:04 +05:00
|
|
|
[Column("value")]
|
|
|
|
public int Value { get; set; }
|
2021-11-30 17:22:38 +05:00
|
|
|
|
2021-12-01 16:09:06 +05:00
|
|
|
[ForeignKey(nameof(IdUserRole))]
|
2021-11-30 17:22:38 +05:00
|
|
|
[InverseProperty(nameof(Model.UserRole.Permissions))]
|
|
|
|
public virtual UserRole UserRole { get; set; }
|
|
|
|
|
2021-12-11 16:46:04 +05:00
|
|
|
[ForeignKey(nameof(IdPermissionInfo))]
|
2021-11-30 17:22:38 +05:00
|
|
|
[InverseProperty(nameof(Model.PermissionInfo.Permissions))]
|
|
|
|
public virtual PermissionInfo PermissionInfo { get; set; }
|
2021-11-24 11:30:29 +05:00
|
|
|
}
|
|
|
|
}
|