feat(dal): таблицы Users, Roles

This commit is contained in:
Mikhail Trubnikov
2023-12-01 10:05:54 +10:00
parent e00826c398
commit 78f2310199
12 changed files with 6111 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
using Microsoft.EntityFrameworkCore;
using System.ComponentModel.DataAnnotations.Schema;
namespace PARR.DAL.Models
{
[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; }
}
}