| | | 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 create a <c>User</c> within a scope (UC-06 path a). <see cref="ScopeId" /> comes from |
| | | 9 | | /// the route; <see cref="ActingPersonId" />/<see cref="ActingRole" /> are set by the controller |
| | | 10 | | /// from the authenticated caller (for the AF-06e ownership check) and are never bound from the body. |
| | | 11 | | /// They are <c>[JsonIgnore]</c>, so they are not deserialized from the body and do not appear in |
| | | 12 | | /// the request schema. |
| | | 13 | | /// </summary> |
| | | 14 | | public class CreateUserCommand : BaseCommand, IActorScoped |
| | | 15 | | { |
| | | 16 | | [JsonIgnore] |
| | 41 | 17 | | public Guid ScopeId { get; set; } |
| | | 18 | | |
| | 106 | 19 | | public string Name { get; set; } = string.Empty; |
| | | 20 | | |
| | 120 | 21 | | public string Email { get; set; } = string.Empty; |
| | | 22 | | |
| | 106 | 23 | | public string Password { get; set; } = string.Empty; |
| | | 24 | | |
| | | 25 | | [JsonIgnore] |
| | 40 | 26 | | public Guid ActingPersonId { get; set; } |
| | | 27 | | |
| | | 28 | | [JsonIgnore] |
| | 40 | 29 | | public int ActingRole { get; set; } |
| | | 30 | | } |