|  |  | 1 |  | using System.ComponentModel.DataAnnotations; | 
|  |  | 2 |  | using LGDXRobotCloud.Data.Models.Business.Navigation; | 
|  |  | 3 |  |  | 
|  |  | 4 |  | namespace LGDXRobotCloud.Data.Models.DTOs.V1.Commands; | 
|  |  | 5 |  |  | 
|  |  | 6 |  | public record WaypointCreateDto | 
|  |  | 7 |  | { | 
|  |  | 8 |  |   [MaxLength(100)] | 
|  |  | 9 |  |   [Required (ErrorMessage = "Please enter a name.")] | 
|  | 0 | 10 |  |   public required string Name { get; set; } | 
|  |  | 11 |  |  | 
|  |  | 12 |  |   [Required (ErrorMessage = "A realm is required.")] | 
|  | 0 | 13 |  |   public required int RealmId { get; set; } | 
|  |  | 14 |  |  | 
|  |  | 15 |  |   [Required (ErrorMessage = "Please enter a X coordinate.")] | 
|  | 0 | 16 |  |   public required double X { get; set; } | 
|  |  | 17 |  |  | 
|  |  | 18 |  |   [Required (ErrorMessage = "Please enter a Y coordinate.")] | 
|  | 0 | 19 |  |   public required double Y { get; set; } | 
|  |  | 20 |  |  | 
|  |  | 21 |  |   [Required (ErrorMessage = "Please enter a rotation.")] | 
|  | 0 | 22 |  |   public required double Rotation { get; set; } | 
|  |  | 23 |  |  | 
|  | 0 | 24 |  |   public bool IsParking { get; set; } = false; | 
|  |  | 25 |  |  | 
|  | 0 | 26 |  |   public bool HasCharger { get; set; } = false; | 
|  |  | 27 |  |  | 
|  | 0 | 28 |  |   public bool IsReserved { get; set; } = false; | 
|  |  | 29 |  | } | 
|  |  | 30 |  |  | 
|  |  | 31 |  | public static class WaypointCreateDtoExtensions | 
|  |  | 32 |  | { | 
|  |  | 33 |  |   public static WaypointCreateBusinessModel ToBusinessModel(this WaypointCreateDto model) | 
|  |  | 34 |  |   { | 
|  |  | 35 |  |     return new WaypointCreateBusinessModel { | 
|  |  | 36 |  |       Name = model.Name, | 
|  |  | 37 |  |       RealmId = model.RealmId, | 
|  |  | 38 |  |       X = model.X, | 
|  |  | 39 |  |       Y = model.Y, | 
|  |  | 40 |  |       Rotation = model.Rotation, | 
|  |  | 41 |  |       IsParking = model.IsParking, | 
|  |  | 42 |  |       HasCharger = model.HasCharger, | 
|  |  | 43 |  |       IsReserved = model.IsReserved, | 
|  |  | 44 |  |     }; | 
|  |  | 45 |  |   } | 
|  |  | 46 |  | } |