| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | using ArturRios.Heimdall.Shared.Security; |
| | | 3 | | using ArturRios.Mediator.Command; |
| | | 4 | | |
| | | 5 | | namespace ArturRios.Heimdall.Command.Input; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Intent to change an application's name and owner (UC-18, FR-AP-06). The application is |
| | | 9 | | /// addressed by <see cref="Id" /> within <see cref="ScopeId" />, both assigned from the route. |
| | | 10 | | /// PUT semantics: <see cref="Name" /> and <see cref="OwnerId" /> are replaced, so a caller |
| | | 11 | | /// changing only the name resubmits the current owner. The scope is a route qualifier, never a |
| | | 12 | | /// field to write — FR-AP-02 fixes an application's scope at creation time. |
| | | 13 | | /// <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller from the |
| | | 14 | | /// authenticated caller. All four are <c>[JsonIgnore]</c>, so they are not deserialized from the |
| | | 15 | | /// body and do not appear in the request schema. |
| | | 16 | | /// </summary> |
| | | 17 | | public class UpdateApplicationCommand : BaseCommand, IActorScoped |
| | | 18 | | { |
| | | 19 | | /// <summary>Public identifier of the scope the application belongs to (assigned from the route).</summary> |
| | | 20 | | [JsonIgnore] |
| | 64 | 21 | | public Guid ScopeId { get; set; } |
| | | 22 | | |
| | | 23 | | /// <summary>Public identifier of the application to update (assigned from the route).</summary> |
| | | 24 | | [JsonIgnore] |
| | 64 | 25 | | public Guid Id { get; set; } |
| | | 26 | | |
| | | 27 | | /// <summary>New application display name. Required, max 200 characters.</summary> |
| | 138 | 28 | | public string Name { get; set; } = string.Empty; |
| | | 29 | | |
| | | 30 | | /// <summary> |
| | | 31 | | /// Public identifier of the person that will own the application (FR-AP-03). Verified only |
| | | 32 | | /// when it differs from the current owner (UC-18 main flow step 4). |
| | | 33 | | /// </summary> |
| | 114 | 34 | | public Guid OwnerId { get; set; } |
| | | 35 | | |
| | | 36 | | [JsonIgnore] |
| | 39 | 37 | | public Guid ActingPersonId { get; set; } |
| | | 38 | | |
| | | 39 | | [JsonIgnore] |
| | 53 | 40 | | public int ActingRole { get; set; } |
| | | 41 | | } |