DD.WellWorkover.Cloud/AsbCloudDb/Model/Permission.cs
Фролов 551c60c4ff Add/refactor services for permissions authorization model.
Rename some fields in DB.permission.
2021-12-11 16:46:04 +05:00

26 lines
879 B
C#

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace AsbCloudDb.Model
{
[Table("t_permission"), Comment("Отношение ролей пользователей и разрешений доступа")]
public class Permission
{
[Column("id_user_role")]
public int IdUserRole { get; set; }
[Column("id_permission_info")]
public int IdPermissionInfo { get; set; }
[Column("value")]
public int Value { get; set; }
[ForeignKey(nameof(IdUserRole))]
[InverseProperty(nameof(Model.UserRole.Permissions))]
public virtual UserRole UserRole { get; set; }
[ForeignKey(nameof(IdPermissionInfo))]
[InverseProperty(nameof(Model.PermissionInfo.Permissions))]
public virtual PermissionInfo PermissionInfo { get; set; }
}
}