forked from ddrilling/AsbCloudServer
23 lines
865 B
C#
23 lines
865 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_relation_user_role_permission"), Comment("Отношение ролей пользователей и разрешений доступа")]
|
|
public class RelationUserRolePermission
|
|
{
|
|
[Column("id_user_role")]
|
|
public int IdUserRole { get; set; }
|
|
|
|
[Column("id_permission")]
|
|
public int IdPermission { get; set; }
|
|
|
|
[ForeignKey(nameof(IdUserRole))]
|
|
[InverseProperty(nameof(Model.UserRole.RelationUserRolePermissions))]
|
|
public virtual UserRole UserRole { get; set; } = null!;
|
|
|
|
[ForeignKey(nameof(IdPermission))]
|
|
[InverseProperty(nameof(Model.Permission.RelationUserRolePermissions))]
|
|
public virtual Permission Permission { get; set; } = null!;
|
|
}
|
|
} |