using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using WalkingTec.Mvvm.Core; namespace HHWMS.Web.Models { [Table("DeviceMetricTrendPoint")] [Display(Name = "DeviceMetricTrendPoint", Description = "设备指标趋势聚合点")] public class DeviceMetricTrendPoint : BasePoco { [Key] [DatabaseGenerated(DatabaseGeneratedOption.Identity)] public new int ID { get; set; } [Display(Name = "DeviceMetricTrendPoint.DeviceId", Description = "设备唯一标识")] [StringLength(100, ErrorMessage = "Validate.{0}stringmax{1}")] [Required(ErrorMessage = "Validate.{0}required")] public string DeviceId { get; set; } [Display(Name = "DeviceMetricTrendPoint.MetricName", Description = "指标名称")] [StringLength(60, ErrorMessage = "Validate.{0}stringmax{1}")] [Required(ErrorMessage = "Validate.{0}required")] public string MetricName { get; set; } [Display(Name = "DeviceMetricTrendPoint.BucketTime", Description = "聚合时间桶")] public DateTime BucketTime { get; set; } [Display(Name = "DeviceMetricTrendPoint.AvgValue", Description = "平均值")] [Column(TypeName = "decimal(18,4)")] public decimal AvgValue { get; set; } [Display(Name = "DeviceMetricTrendPoint.MaxValue", Description = "最大值")] [Column(TypeName = "decimal(18,4)")] public decimal MaxValue { get; set; } [Display(Name = "DeviceMetricTrendPoint.MinValue", Description = "最小值")] [Column(TypeName = "decimal(18,4)")] public decimal MinValue { get; set; } [Display(Name = "DeviceMetricTrendPoint.SampleCount", Description = "样本数")] public int SampleCount { get; set; } } }