forked from ddrilling/AsbCloudServer
24 lines
798 B
C#
24 lines
798 B
C#
|
using Microsoft.EntityFrameworkCore;
|
||
|
using System.ComponentModel.DataAnnotations.Schema;
|
||
|
using System.ComponentModel.DataAnnotations;
|
||
|
|
||
|
namespace AsbCloudDb.Model
|
||
|
{
|
||
|
[Table("t_relation_user_user_role"), Comment("Отношение пользователей и ролей")]
|
||
|
public class RelationUserUserRole
|
||
|
{
|
||
|
[Column("id_user")]
|
||
|
public int IdUser { get; set; }
|
||
|
|
||
|
[Column("id_user_role")]
|
||
|
public int IdUserRole { get; set; }
|
||
|
|
||
|
[ForeignKey(nameof(IdUser))]
|
||
|
[InverseProperty(nameof(Model.User.RelationUsersUserRoles))]
|
||
|
public virtual User User { get; set; }
|
||
|
|
||
|
[ForeignKey(nameof(IdUserRole))]
|
||
|
[InverseProperty(nameof(Model.UserRole.RelationUsersUserRoles))]
|
||
|
public virtual UserRole UserRole { get; set; }
|
||
|
}
|
||
|
}
|