| | | 1 | | namespace ArturRios.Heimdall.Domain.Entities; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Join row linking a <see cref="Scope" /> to a <see cref="Person" /> who belongs to it (a |
| | | 5 | | /// person with the <c>User</c> role). <see cref="PersonId" /> is unique across this table, |
| | | 6 | | /// enforcing that a User belongs to exactly one scope, while a scope may have many users. Not |
| | | 7 | | /// an independently addressable resource, so it carries no <c>PublicId</c>. |
| | | 8 | | /// </summary> |
| | | 9 | | public class ScopeUser |
| | | 10 | | { |
| | | 11 | | /// <summary>Foreign key to the <see cref="Scope" /> the person belongs to (internal Id). Required.</summary> |
| | 508 | 12 | | public long ScopeId { get; set; } |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Foreign key to the <see cref="Person" /> (internal Id), which must have the <c>User</c> |
| | | 16 | | /// role. Required and unique across this table. |
| | | 17 | | /// </summary> |
| | 177 | 18 | | public long PersonId { get; set; } |
| | | 19 | | |
| | | 20 | | // Navigation properties |
| | | 21 | | |
| | | 22 | | /// <summary>The scope the person belongs to.</summary> |
| | 285 | 23 | | public Scope Scope { get; set; } = null!; |
| | | 24 | | |
| | | 25 | | /// <summary>The member person.</summary> |
| | 7 | 26 | | public Person Person { get; set; } = null!; |
| | | 27 | | } |