| | | 1 | | using LGDXRobotCloud.Data.Models.DTOs.V1.Responses; |
| | | 2 | | |
| | | 3 | | namespace LGDXRobotCloud.Data.Models.Business.Administration; |
| | | 4 | | |
| | | 5 | | public record RobotCertificateBusinessModel |
| | | 6 | | { |
| | | 7 | | public required Guid Id { get; set; } |
| | | 8 | | |
| | | 9 | | public required Guid RobotId { get; set; } |
| | | 10 | | |
| | | 11 | | public required string RobotName { get; set; } |
| | | 12 | | |
| | | 13 | | public required string Thumbprint { get; set; } |
| | | 14 | | |
| | | 15 | | public string? ThumbprintBackup { get; set; } |
| | | 16 | | |
| | | 17 | | public required DateTime NotBefore { get; set; } |
| | | 18 | | |
| | | 19 | | public required DateTime NotAfter { get; set; } |
| | | 20 | | } |
| | | 21 | | |
| | | 22 | | public static class RobotCertificateBusinessModelExtensions |
| | | 23 | | { |
| | | 24 | | public static RobotCertificateDto ToDto(this RobotCertificateBusinessModel robotCertificate) |
| | 0 | 25 | | { |
| | 0 | 26 | | return new RobotCertificateDto{ |
| | 0 | 27 | | Id = robotCertificate.Id, |
| | 0 | 28 | | Robot = new RobotSearchDto { |
| | 0 | 29 | | Id = robotCertificate.RobotId, |
| | 0 | 30 | | Name = robotCertificate.RobotName |
| | 0 | 31 | | }, |
| | 0 | 32 | | Thumbprint = robotCertificate.Thumbprint, |
| | 0 | 33 | | ThumbprintBackup = robotCertificate.ThumbprintBackup, |
| | 0 | 34 | | NotBefore = robotCertificate.NotBefore, |
| | 0 | 35 | | NotAfter = robotCertificate.NotAfter |
| | 0 | 36 | | }; |
| | 0 | 37 | | } |
| | | 38 | | } |