|  |  | 1 |  | using LGDXRobotCloud.Data.Models.Business.Navigation; | 
|  |  | 2 |  | using LGDXRobotCloud.Data.Models.DTOs.V1.Responses; | 
|  |  | 3 |  |  | 
|  |  | 4 |  | namespace LGDXRobotCloud.Data.Models.Business.Automation; | 
|  |  | 5 |  |  | 
|  |  | 6 |  | public record AutoTaskDetailBusinessModel | 
|  |  | 7 |  | { | 
|  | 7 | 8 |  |   public required int Id { get; set; } | 
|  |  | 9 |  |  | 
|  | 8 | 10 |  |   public required int Order { get; set; } | 
|  |  | 11 |  |  | 
|  | 8 | 12 |  |   public double? CustomX { get; set; } | 
|  |  | 13 |  |  | 
|  | 8 | 14 |  |   public double? CustomY { get; set; } | 
|  |  | 15 |  |  | 
|  | 8 | 16 |  |   public double? CustomRotation { get; set; } | 
|  |  | 17 |  |  | 
|  | 24 | 18 |  |   public WaypointBusinessModel? Waypoint { get; set; } | 
|  |  | 19 |  | } | 
|  |  | 20 |  |  | 
|  |  | 21 |  | public static class AutoTaskDetailBusinessModelExtensions | 
|  |  | 22 |  | { | 
|  |  | 23 |  |   public static AutoTaskDetailDto ToDto(this AutoTaskDetailBusinessModel model) | 
|  |  | 24 |  |   { | 
|  |  | 25 |  |     return new AutoTaskDetailDto { | 
|  |  | 26 |  |       Id = model.Id, | 
|  |  | 27 |  |       Order = model.Order, | 
|  |  | 28 |  |       CustomX = model.CustomX, | 
|  |  | 29 |  |       CustomY = model.CustomY, | 
|  |  | 30 |  |       CustomRotation = model.CustomRotation, | 
|  |  | 31 |  |       Waypoint = model.Waypoint == null ? null : new WaypointDto { | 
|  |  | 32 |  |         Id = model.Waypoint.Id, | 
|  |  | 33 |  |         Name = model.Waypoint.Name, | 
|  |  | 34 |  |         Realm = new RealmSearchDto { | 
|  |  | 35 |  |           Id = model.Waypoint.RealmId, | 
|  |  | 36 |  |           Name = model.Waypoint.RealmName, | 
|  |  | 37 |  |         }, | 
|  |  | 38 |  |         X = model.Waypoint.X, | 
|  |  | 39 |  |         Y = model.Waypoint.Y, | 
|  |  | 40 |  |         Rotation = model.Waypoint.Rotation, | 
|  |  | 41 |  |         IsParking = model.Waypoint.IsParking, | 
|  |  | 42 |  |         HasCharger = model.Waypoint.HasCharger, | 
|  |  | 43 |  |         IsReserved = model.Waypoint.IsReserved, | 
|  |  | 44 |  |       }, | 
|  |  | 45 |  |     }; | 
|  |  | 46 |  |   } | 
|  |  | 47 |  | } |