| | | 1 | | using System.ComponentModel.DataAnnotations; |
| | | 2 | | using LGDXRobotCloud.Data.Models.Business.Automation; |
| | | 3 | | |
| | | 4 | | namespace LGDXRobotCloud.Data.Models.DTOs.V1.Commands; |
| | | 5 | | |
| | | 6 | | public record FlowDetailUpdateDto |
| | | 7 | | { |
| | | 8 | | public int? Id { get; set; } |
| | | 9 | | |
| | | 10 | | [Required] |
| | | 11 | | public required int Order { get; set; } |
| | | 12 | | |
| | | 13 | | [Required (ErrorMessage = "Please select a progress.")] |
| | | 14 | | public required int ProgressId { get; set; } |
| | | 15 | | |
| | | 16 | | [Required] |
| | | 17 | | public required int AutoTaskNextControllerId { get; set; } |
| | | 18 | | |
| | | 19 | | public int? TriggerId { get; set; } |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | public static class FlowDetailUpdateDtoExtensions |
| | | 23 | | { |
| | | 24 | | public static FlowDetailUpdateBusinessModel ToBusinessModel(this FlowDetailUpdateDto flowDetailUpdateDto) |
| | 0 | 25 | | { |
| | 0 | 26 | | return new FlowDetailUpdateBusinessModel { |
| | 0 | 27 | | Id = flowDetailUpdateDto.Id, |
| | 0 | 28 | | Order = flowDetailUpdateDto.Order, |
| | 0 | 29 | | ProgressId = flowDetailUpdateDto.ProgressId, |
| | 0 | 30 | | AutoTaskNextControllerId = flowDetailUpdateDto.AutoTaskNextControllerId, |
| | 0 | 31 | | TriggerId = flowDetailUpdateDto.TriggerId, |
| | 0 | 32 | | }; |
| | 0 | 33 | | } |
| | | 34 | | } |