|  |  | 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 WaypointUpdateDto | 
|  |  | 7 |  | { | 
|  |  | 8 |  |   [MaxLength(100)] | 
|  |  | 9 |  |   [Required (ErrorMessage = "Please enter a name.")] | 
|  | 0 | 10 |  |   public required string Name { get; set; } | 
|  |  | 11 |  |  | 
|  |  | 12 |  |   [Required (ErrorMessage = "Please enter a X coordinate.")] | 
|  | 0 | 13 |  |   public required double X { get; set; } | 
|  |  | 14 |  |  | 
|  |  | 15 |  |   [Required (ErrorMessage = "Please enter a Y coordinate.")] | 
|  | 0 | 16 |  |   public required double Y { get; set; } | 
|  |  | 17 |  |  | 
|  |  | 18 |  |   [Required (ErrorMessage = "Please enter a rotation.")] | 
|  | 0 | 19 |  |   public required double Rotation { get; set; } | 
|  |  | 20 |  |  | 
|  | 0 | 21 |  |   public bool IsParking { get; set; } = false; | 
|  |  | 22 |  |  | 
|  | 0 | 23 |  |   public bool HasCharger { get; set; } = false; | 
|  |  | 24 |  |  | 
|  | 0 | 25 |  |   public bool IsReserved { get; set; } = false; | 
|  |  | 26 |  | } | 
|  |  | 27 |  |  | 
|  |  | 28 |  | public static class WaypointUpdateDtoExtensions | 
|  |  | 29 |  | { | 
|  |  | 30 |  |   public static WaypointUpdateBusinessModel ToBusinessModel(this WaypointUpdateDto model) | 
|  |  | 31 |  |   { | 
|  |  | 32 |  |     return new WaypointUpdateBusinessModel { | 
|  |  | 33 |  |       Name = model.Name, | 
|  |  | 34 |  |       X = model.X, | 
|  |  | 35 |  |       Y = model.Y, | 
|  |  | 36 |  |       Rotation = model.Rotation, | 
|  |  | 37 |  |       IsParking = model.IsParking, | 
|  |  | 38 |  |       HasCharger = model.HasCharger, | 
|  |  | 39 |  |       IsReserved = model.IsReserved, | 
|  |  | 40 |  |     }; | 
|  |  | 41 |  |   } | 
|  |  | 42 |  | } |