| | 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 | | { |
| | 8 | | public required int Id { get; set; } |
| | 9 | |
|
| | 10 | | public required int Order { get; set; } |
| | 11 | |
|
| | 12 | | public double? CustomX { get; set; } |
| | 13 | |
|
| | 14 | | public double? CustomY { get; set; } |
| | 15 | |
|
| | 16 | | public double? CustomRotation { get; set; } |
| | 17 | |
|
| | 18 | | public WaypointBusinessModel? Waypoint { get; set; } |
| | 19 | | } |
| | 20 | |
|
| | 21 | | public static class AutoTaskDetailBusinessModelExtensions |
| | 22 | | { |
| | 23 | | public static AutoTaskDetailDto ToDto(this AutoTaskDetailBusinessModel model) |
| 0 | 24 | | { |
| 0 | 25 | | return new AutoTaskDetailDto { |
| 0 | 26 | | Id = model.Id, |
| 0 | 27 | | Order = model.Order, |
| 0 | 28 | | CustomX = model.CustomX, |
| 0 | 29 | | CustomY = model.CustomY, |
| 0 | 30 | | CustomRotation = model.CustomRotation, |
| 0 | 31 | | Waypoint = model.Waypoint == null ? null : new WaypointDto { |
| 0 | 32 | | Id = model.Waypoint.Id, |
| 0 | 33 | | Name = model.Waypoint.Name, |
| 0 | 34 | | Realm = new RealmSearchDto { |
| 0 | 35 | | Id = model.Waypoint.RealmId, |
| 0 | 36 | | Name = model.Waypoint.RealmName, |
| 0 | 37 | | }, |
| 0 | 38 | | X = model.Waypoint.X, |
| 0 | 39 | | Y = model.Waypoint.Y, |
| 0 | 40 | | Rotation = model.Waypoint.Rotation, |
| 0 | 41 | | IsParking = model.Waypoint.IsParking, |
| 0 | 42 | | HasCharger = model.Waypoint.HasCharger, |
| 0 | 43 | | IsReserved = model.Waypoint.IsReserved, |
| 0 | 44 | | }, |
| 0 | 45 | | }; |
| 0 | 46 | | } |
| | 47 | | } |