| | | 1 | | namespace ArturRios.Heimdall.Domain.Entities; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Join row linking a <see cref="Scope" /> to a <see cref="Person" /> who owns it (a person |
| | | 5 | | /// with the <c>ScopeAdmin</c> role). A scope may have many owners and a Scope Admin may own |
| | | 6 | | /// many scopes. Not an independently addressable resource, so it carries no <c>PublicId</c>; |
| | | 7 | | /// its composite key is <c>(ScopeId, PersonId)</c>, configured in the persistence layer. |
| | | 8 | | /// </summary> |
| | | 9 | | public class ScopeOwner |
| | | 10 | | { |
| | | 11 | | /// <summary>Foreign key to the owned <see cref="Scope" /> (internal Id). Part of the composite key.</summary> |
| | 692 | 12 | | public long ScopeId { get; set; } |
| | | 13 | | |
| | | 14 | | /// <summary> |
| | | 15 | | /// Foreign key to the owning <see cref="Person" /> (internal Id), which must have the |
| | | 16 | | /// <c>ScopeAdmin</c> role. Part of the composite key. |
| | | 17 | | /// </summary> |
| | 287 | 18 | | public long PersonId { get; set; } |
| | | 19 | | |
| | | 20 | | // Navigation properties |
| | | 21 | | |
| | | 22 | | /// <summary>The owned scope.</summary> |
| | 227 | 23 | | public Scope Scope { get; set; } = null!; |
| | | 24 | | |
| | | 25 | | /// <summary>The owning person.</summary> |
| | 108 | 26 | | public Person Person { get; set; } = null!; |
| | | 27 | | } |