Device.cs 1.2 KB

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