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

23 lines
771 B
C#
Raw Normal View History

using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
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; } = null!;
[ForeignKey(nameof(IdUserRole))]
[InverseProperty(nameof(Model.UserRole.RelationUsersUserRoles))]
public virtual UserRole UserRole { get; set; } = null!;
}
}