123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
- namespace WCS.Entity
- {
- public enum DeviceType
- {
- }
- public class WCS_DEVICE
- {
- [Key]
- [Required]
- [Display(Name = "设备编号")]
- [StringLength(50)]
- public string CODE { get; set; }
- [Display(Name = "设备名称")]
- [StringLength(50)]
- [Required]
- public string NAME { get; set; }
- //[Display(Name = "设备类型")]
- //[StringLength(100)]
- //[Required]
- //public string TYPE { get; set; }
- [Display(Name = "可用")]
- public bool ENABLED { get; set; } = true;
- [MaxLength(50)]
- [Required]
- [Display(Name = "更新者")]
- public string UPDATEUSER { get; set; }
- [Display(Name = "更新时间")]
- public DateTime UPDATETIME { get; set; } = DateTime.Now;
- [Timestamp]
- [Display(Name = "版本")]
- public byte[] VER { get; set; }
- public List<WCS_DEVICEPROTOCOL> PROTOCOLS { get; set; } = new List<WCS_DEVICEPROTOCOL>();
- [InverseProperty("DEVICE")]
- public List<WCS_ROUTE> ROUTES { get; set; } = new List<WCS_ROUTE>();
- [InverseProperty("START")]
- public List<WCS_PATH> PATHS { get; set; } = new List<WCS_PATH>();
- /// <summary>
- /// 设备组中的内容
- /// </summary>
- [InverseProperty("GROUP")]
- public List<WCS_GROUPMEMBER> DEVICEGROUP { get; set; } = new List<WCS_GROUPMEMBER>();
- public override string ToString()
- {
- return CODE;
- }
- }
- public class WCS_DEVICEPROTOCOL : OBJ
- {
- [Display(Name = "设备")]
- [Required]
- public WCS_DEVICE DEVICE { get; set; }
- [Display(Name = "DB块")]
- [Required]
- public WCS_DATABLOCK DB { get; set; }
- [Display(Name = "起始位置")]
- public Int16 POSITION { get; set; }
- }
- }
|