forked from ddrilling/AsbCloudServer
27 lines
924 B
C#
27 lines
924 B
C#
using Microsoft.EntityFrameworkCore;
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace AsbCloudDb.Model
|
|
{
|
|
[Table("t_permission"), Comment("Отношение ролей пользователей и разрешений доступа")]
|
|
public class Permission
|
|
{
|
|
[Column("id_user_role")]
|
|
public int IdRole { get; set; }
|
|
|
|
[Column("id_permission")]
|
|
public int IdPermission { get; set; }
|
|
|
|
[Column("permission_value")]
|
|
public int PermissionValue { get; set; }
|
|
|
|
[ForeignKey(nameof(IdRole))]
|
|
[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; }
|
|
}
|
|
} |