| | | 1 | | using ArturRios.Mediator.Command; |
| | | 2 | | |
| | | 3 | | namespace ArturRios.Heimdall.Command.Output; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Result of <see cref="Input.AddScopeOwnerCommand" /> (UC-21). Reports the two <c>PublicId</c>s the |
| | | 7 | | /// ownership links, whether the request was the idempotent no-op of AF-21d, and — for a Scope Admin |
| | | 8 | | /// actor — the invitation opened instead of the ownership (FR-SC-14). The <c>SCOPE_OWNER</c> row itself |
| | | 9 | | /// has no identifier to return — it is a join row, not an addressable resource — and internal Ids never |
| | | 10 | | /// leave the data layer. |
| | | 11 | | /// </summary> |
| | | 12 | | public class AddScopeOwnerCommandOutput : CommandOutput |
| | | 13 | | { |
| | | 14 | | /// <summary>Public identifier of the scope.</summary> |
| | 45 | 15 | | public Guid ScopeId { get; set; } |
| | | 16 | | |
| | | 17 | | /// <summary>Public identifier of the person added or invited.</summary> |
| | 45 | 18 | | public Guid PersonId { get; set; } |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// <c>true</c> when the person already owned the scope and nothing was written (AF-21d). AF-21d already |
| | | 22 | | /// answers with its own status (200 against the main flow's 201), so this flag confirms which path ran |
| | | 23 | | /// rather than being the only way to tell them apart. |
| | | 24 | | /// </summary> |
| | 48 | 25 | | public bool AlreadyOwner { get; set; } |
| | | 26 | | |
| | | 27 | | /// <summary> |
| | | 28 | | /// <c>true</c> when a Scope Admin asked and the person was invited rather than added (FR-SC-14): they |
| | | 29 | | /// own nothing until they accept (UC-60). The answer is then 202. Always <c>false</c> for a System |
| | | 30 | | /// Admin and for AF-21d. |
| | | 31 | | /// </summary> |
| | 38 | 32 | | public bool Invited { get; set; } |
| | | 33 | | |
| | | 34 | | /// <summary>The open invitation's public id when <see cref="Invited" />; what UC-58 withdraws it by.</summary> |
| | 41 | 35 | | public Guid? InvitationId { get; set; } |
| | | 36 | | |
| | | 37 | | /// <summary>When the open invitation stops being acceptable, when <see cref="Invited" />.</summary> |
| | 33 | 38 | | public DateTime? InvitationExpiresAt { get; set; } |
| | | 39 | | } |