23 lines
541 B
C#
23 lines
541 B
C#
namespace Heimdall.Domain.Entities;
|
|
|
|
/// <summary>
|
|
/// Join entity for the many-to-many relationship between users and groups.
|
|
/// </summary>
|
|
public class UserGroup
|
|
{
|
|
public Guid UserId { get; private set; }
|
|
public Guid GroupId { get; private set; }
|
|
|
|
// Navigation
|
|
public AppUser User { get; private set; } = null!;
|
|
public Group Group { get; private set; } = null!;
|
|
|
|
private UserGroup() { } // EF Core
|
|
|
|
public UserGroup(Guid userId, Guid groupId)
|
|
{
|
|
UserId = userId;
|
|
GroupId = groupId;
|
|
}
|
|
}
|