| | | 1 | | using LGDXRobotCloud.Data.Models.DTOs.V1.Responses; |
| | | 2 | | |
| | | 3 | | namespace LGDXRobotCloud.Data.Models.Business.Navigation; |
| | | 4 | | |
| | | 5 | | public record RobotChassisInfoBusinessModel |
| | | 6 | | { |
| | | 7 | | public int Id { get; set; } |
| | | 8 | | |
| | | 9 | | public required int RobotTypeId { get; set; } |
| | | 10 | | |
| | | 11 | | public required double ChassisLengthX { get; set; } |
| | | 12 | | |
| | | 13 | | public required double ChassisLengthY { get; set; } |
| | | 14 | | |
| | | 15 | | public required int ChassisWheelCount { get; set; } |
| | | 16 | | |
| | | 17 | | public required double ChassisWheelRadius { get; set; } |
| | | 18 | | |
| | | 19 | | public required int BatteryCount { get; set; } |
| | | 20 | | |
| | | 21 | | public required double BatteryMaxVoltage { get; set; } |
| | | 22 | | |
| | | 23 | | public required double BatteryMinVoltage { get; set; } |
| | | 24 | | } |
| | | 25 | | |
| | | 26 | | public static class RobotChassisInfoBusinessModelExtensions |
| | | 27 | | { |
| | | 28 | | public static RobotChassisInfoDto ToDto(this RobotChassisInfoBusinessModel robotChassisInfo) |
| | 0 | 29 | | { |
| | 0 | 30 | | return new RobotChassisInfoDto { |
| | 0 | 31 | | Id = robotChassisInfo.Id, |
| | 0 | 32 | | RobotTypeId = robotChassisInfo.RobotTypeId, |
| | 0 | 33 | | ChassisLengthX = robotChassisInfo.ChassisLengthX, |
| | 0 | 34 | | ChassisLengthY = robotChassisInfo.ChassisLengthY, |
| | 0 | 35 | | ChassisWheelCount = robotChassisInfo.ChassisWheelCount, |
| | 0 | 36 | | ChassisWheelRadius = robotChassisInfo.ChassisWheelRadius, |
| | 0 | 37 | | BatteryCount = robotChassisInfo.BatteryCount, |
| | 0 | 38 | | BatteryMaxVoltage = robotChassisInfo.BatteryMaxVoltage, |
| | 0 | 39 | | BatteryMinVoltage = robotChassisInfo.BatteryMinVoltage, |
| | 0 | 40 | | }; |
| | 0 | 41 | | } |
| | | 42 | | } |