Device.cs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. using System;
  2. using System.ComponentModel.DataAnnotations;
  3. using System.ComponentModel.DataAnnotations.Schema;
  4. namespace IMCS.CCS.Entitys
  5. {
  6. [Table("ccs_device")]
  7. public class Device
  8. {
  9. [Key]
  10. [Column("id")]
  11. [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
  12. public int Id { get; set; }
  13. [Column("ip")]
  14. public string Ip { get; set; }
  15. [Column("port")]
  16. public string Port { get; set; }
  17. [Column("user_name")]
  18. public string UserName { get; set; }
  19. [Column("password")]
  20. public string Password { get; set; }
  21. [Column("server_url")]
  22. public string ServerUrl { get; set; }
  23. [Column("protocol_type")]
  24. public string ProtocolType { get; set; }
  25. [Column("state")]
  26. public bool State { get; set; }
  27. [Column("use_state")]
  28. public bool UseState { get; set; }
  29. [Column("description")]
  30. public string Description { get; set; }
  31. [Column("disconnect_update_time")]
  32. public DateTime DisconnectUpdateTime { get; set; } = DateTime.Now;
  33. [Column("offline_update_time")]
  34. public DateTime OfflineUpdateTime { get; set; } = DateTime.Now;
  35. [Column("timeout_remind_duration")]
  36. public float TimeoutRemindDuration { get; set; }
  37. }
  38. /// <summary>
  39. /// 协议类型
  40. /// </summary>
  41. public enum ProtocalTypeEnum
  42. {
  43. OPCUA,
  44. S7_1500,
  45. S7_1200,
  46. S7_400,
  47. S7_300,
  48. FTP,
  49. FANUC,
  50. HEIDEHAIN,
  51. MAZAK
  52. }
  53. }