using System;
using System.Collections.Generic;

namespace CNCSystem.Models.Device
{
    public class CNCDevice
    {
        public int Id { get; set; }
        public string DeviceCode { get; set; }
        public string DeviceName { get; set; }
        public string IPAddress { get; set; }
        public string HttpUrl { get; set; }
        public int CollectionInterval { get; set; }
        public int TemplateId { get; set; }
        public bool IsAvailable { get; set; }
        public bool IsOnline { get; set; }
        public DateTime LastCollectionTime { get; set; }
        public DateTime CreatedAt { get; set; }
        public DateTime UpdatedAt { get; set; }
    }

    public class DeviceStatus
    {
        public int Id { get; set; }
        public int DeviceId { get; set; }
        public string Status { get; set; }
        public bool IsRunning { get; set; }
        public string NCProgram { get; set; }
        public int CumulativeCount { get; set; }
        public string OperatingMode { get; set; }
        public DateTime RecordTime { get; set; }
    }

    public class DeviceCurrentStatus
    {
        public int DeviceId { get; set; }
        public bool IsOnline { get; set; }
        public bool IsAvailable { get; set; }
        public string Status { get; set; }
        public bool IsRunning { get; set; }
        public string NCProgram { get; set; }
        public int CumulativeCount { get; set; }
        public string OperatingMode { get; set; }
        public DateTime RecordTime { get; set; }
        public List<TagData> Tags { get; set; }
    }

    public class TagData
    {
        public string Id { get; set; }
        public string Desc { get; set; }
        public string Quality { get; set; }
        public object Value { get; set; }
        public DateTime Time { get; set; }
    }
}