2023-12-01 10:05:54 +10:00
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
|
using System.ComponentModel.DataAnnotations.Schema;
|
|
|
|
|
|
|
2026-04-30 10:35:31 +10:00
|
|
|
|
namespace PARR.Domain.Entities
|
2023-12-01 10:05:54 +10:00
|
|
|
|
{
|
|
|
|
|
|
[Table("UsersInRoles")]
|
|
|
|
|
|
[PrimaryKey(nameof(RoleId), nameof(UserId))]
|
|
|
|
|
|
public class UsersInRole
|
|
|
|
|
|
{
|
|
|
|
|
|
public Guid RoleId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
public Guid UserId { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(RoleId))]
|
|
|
|
|
|
public Role? Role { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
[ForeignKey(nameof(UserId))]
|
|
|
|
|
|
public User? User { get; set; }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|