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

28 lines
976 B
C#

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace AsbCloudDb.Model
{
[Table("t_relation_user_role_permission"), Comment("Отношение ролей пользователей и разрешений доступа")]
public class RelationUserRolePermission
{
[Key]
[Column("id")]
public int Id { get; set; }
[Column("id_user_role")]
public int IdUserRole { get; set; }
[Column("id_permission")]
public int IdPermission { get; set; }
[ForeignKey(nameof(IdUserRole))]
[InverseProperty(nameof(Model.UserRole.RelationUserRolesPermissions))]
public virtual UserRole UserRole { get; set; }
[ForeignKey(nameof(IdPermission))]
[InverseProperty(nameof(Model.Permission.RelationUserRolesPermissions))]
public virtual Permission Permission { get; set; }
}
}