using FreeSql.DataAnnotations; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace MoviconHub.App.Models { /// /// 设备状态 /// [Table(Name = "DeviceState")] public class DeviceState { /// /// 主键ID /// [Column(IsPrimary = true, IsIdentity = true)] public long Id { get; set; } /// /// 设备码 /// [Column(Name = "DeviceCode", StringLength = 100, IsNullable = true)] public string DeviceCode { get; set; } /// /// 设备名称 /// [Column(Name = "DeviceName", StringLength = 100, IsNullable = true)] public string DeviceName { get; set; } /// /// 开机时长(status为1) /// [Column(Name = "PowerOnTime", IsNullable = true)] public int PowerOnTime { get; set; } /// /// 运行时长(status为2) /// [Column(Name = "RunTime", IsNullable = true)] public int RunTime { get; set; } /// /// 待机时长(status为3) /// [Column(Name = "StandbyTime", IsNullable = true)] public int StandbyTime { get; set; } /// /// 故障时长(status为4) /// [Column(Name = "FaultTime", IsNullable = true)] public int FaultTime { get; set; } /// /// 关机时长(status为5) /// [Column(Name = "ShutdownTime", IsNullable = true)] public int ShutdownTime { get; set; } ///// ///// 使用率(PowerOnTime+ RunTime+ StandbyTime+ FaultTime)/( EndTime- StartTime) 从ts_sh_device_status_change_log中计算 ///// //[Column(Name = "UseRatio", IsNullable = true)] //public int UseRatio { get; set; } /// /// 使用率(PowerOnTime+ RunTime+ StandbyTime+ FaultTime)/( EndTime- StartTime) 从ts_sh_device_status_change_log中计算 /// [Column(Name = "UseRatio", StringLength = 100, IsNullable = true)] public string UseRatio { get; set; } /// /// 故障次数 /// [Column(Name = "FaultNum", IsNullable = true)] public int FaultNum { get; set; } /// /// 作业次数,建议从作业数据表中取数据 /// [Column(Name = "JobNum", IsNullable = true)] public int JobNum { get; set; } /// /// 创建时间 /// [Column(ServerTime = DateTimeKind.Local, CanUpdate = false)] public DateTime CreateTime { get; set; } } }