using System;

namespace CncModels.Entity
{
    /// <summary>
    /// cnc_machine 机床表
    /// </summary>
    public class Machine
    {
        /// <summary>主键ID</summary>
        public int Id { get; set; }

        /// <summary>设备编码</summary>
        public string DeviceCode { get; set; }

        /// <summary>名称</summary>
        public string Name { get; set; }

        /// <summary>车间ID</summary>
        public int WorkshopId { get; set; }

        /// <summary>采集地址ID</summary>
        public int CollectAddressId { get; set; }

        /// <summary>IP地址</summary>
        public string IpAddress { get; set; }

        /// <summary>品牌ID</summary>
        public int BrandId { get; set; }

        /// <summary>是否启用</summary>
        public int IsEnabled { get; set; }

        /// <summary>最近Ping时间（在线状态由 last_ping_time 实时计算）</summary>
        public DateTime? LastPingTime { get; set; }

        /// <summary>最近Ping延迟(ms)，4次平均值</summary>
        public int? LastPingLatency { get; set; }

        /// <summary>最近采集时间</summary>
        public DateTime? LastCollectTime { get; set; }

        /// <summary>最近设备状态</summary>
        public string LastDeviceStatus { get; set; }

        /// <summary>最近运行状态</summary>
        public string LastRunStatus { get; set; }

        /// <summary>最近程序名</summary>
        public string LastProgramName { get; set; }

        /// <summary>最近零件数</summary>
        public decimal? LastPartCount { get; set; }

        /// <summary>最近操作模式</summary>
        public string LastOperateMode { get; set; }

        /// <summary>最近加工状态</summary>
        public string LastMachiningStatus { get; set; }

        /// <summary>创建时间</summary>
        public DateTime CreatedAt { get; set; }

        /// <summary>修改时间</summary>
        public DateTime UpdatedAt { get; set; }
    }
}
