SYS_Device.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Ant.Core.SqlServer.BaseEntities;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel.DataAnnotations;
  5. using System.Linq;
  6. using System.Web;
  7. namespace Central.Control.WebApi.DbEntity
  8. {
  9. /// <summary>
  10. /// 设备表
  11. /// </summary>
  12. public class SYS_Device: SoftBaseEntity
  13. {
  14. /// <summary>
  15. /// 主键ID
  16. /// </summary>
  17. [Key]
  18. [MaxLength(50)]
  19. public string Id { set; get; } = string.Empty;
  20. /// <summary>
  21. /// 设备名称
  22. /// </summary>
  23. [MaxLength(50)]
  24. [Required(AllowEmptyStrings =true)]
  25. public string Name { set; get; } = string.Empty;
  26. /// <summary>
  27. /// 设备编号(唯一)
  28. /// </summary>
  29. [MaxLength(50)]
  30. [Required(AllowEmptyStrings = true)]
  31. public string Code { set; get; } = string.Empty;
  32. /// <summary>
  33. /// 设备地址
  34. /// </summary>
  35. [MaxLength(255)]
  36. [Required(AllowEmptyStrings = true)]
  37. public string Address { set; get; } = string.Empty;
  38. /// <summary>
  39. /// 设备密码
  40. /// </summary>
  41. [MaxLength(50)]
  42. [Required(AllowEmptyStrings = true)]
  43. public string Password { set; get; } = string.Empty;
  44. }
  45. }