DD.WellWorkover.Cloud/AsbCloudDb/Model/Permission.cs

26 lines
879 B
C#
Raw Normal View History

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; }
}
}