Files
mapo-iob-libs/EgwProxy.Emmegi/DTO/StatusDTO.cs
T
2025-07-10 12:52:35 +02:00

65 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.ComTypes;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
namespace EgwProxy.Emmegi.DTO
{
[XmlRoot("result_workstation_status")]
public class StatusDTO
{
[XmlElement("workstation")]
public Workstation Workstation { get; set; }
}
/// <summary>
/// Obj workstation
/// </summary>
public class Workstation
{
[XmlElement("id")]
public WorkstationId Id { get; set; }
[XmlElement("status")]
public Enums.MachineStatus Status { get; set; }
[XmlElement("status_timestamp")]
public string StatusTimestampRaw { get; set; }
[XmlIgnore]
public DateTime StatusTimestamp
{
get => DateTime.ParseExact(StatusTimestampRaw, "yyyy-MM-dd HH:mm:ss", null);
}
[XmlElement("operator")]
public string Operator { get; set; }
[XmlElement("job_id")]
public string JobId { get; set; }
[XmlElement("operations")]
public int Operations { get; set; }
[XmlElement("tot_operations")]
public int TotalOperations { get; set; }
}
/// <summary>
/// Obj WorkstationId
/// </summary>
public class WorkstationId
{
[XmlAttribute("id")]
public string IdValue { get; set; }
}
}