DD.WellWorkover.Cloud/AsbCloudDb/Model/Permission.cs
2021-12-01 16:09:06 +05:00

26 lines
887 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")]
public int IdPermission { get; set; }
[Column("permission_value")]
public int PermissionValue { get; set; }
[ForeignKey(nameof(IdUserRole))]
[InverseProperty(nameof(Model.UserRole.Permissions))]
public virtual UserRole UserRole { get; set; }
[ForeignKey(nameof(IdPermission))]
[InverseProperty(nameof(Model.PermissionInfo.Permissions))]
public virtual PermissionInfo PermissionInfo { get; set; }
}
}