forked from ddrilling/AsbCloudServer
551c60c4ff
Rename some fields in DB.permission.
26 lines
879 B
C#
26 lines
879 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_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; }
|
|
}
|
|
} |