SysDistrict.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using SqlSugar;
  2. using System.Collections.Generic;
  3. using System.ComponentModel.DataAnnotations;
  4. namespace Admin.NET.Core
  5. {
  6. /// <summary>
  7. /// 系统行政区域表
  8. ///</summary>
  9. [SugarTable("sys_district", "系统行政区域表")]
  10. [SqlSugarEntity]
  11. public class SysDistrict : EntityBase
  12. {
  13. /// <summary>
  14. /// 父节点Id
  15. ///</summary>
  16. [SugarColumn(ColumnName = "pid", ColumnDescription = "父Id")]
  17. public long Pid { get; set; }
  18. /// <summary>
  19. /// 名称
  20. ///</summary>
  21. [SugarColumn(ColumnName = "name", ColumnDescription = "名称", Length = 200)]
  22. [MaxLength(200)]
  23. public string Name { get; set; }
  24. /// <summary>
  25. /// 值
  26. ///</summary>
  27. [SugarColumn(ColumnName = "value", ColumnDescription = "值", Length = 200)]
  28. [MaxLength(200)]
  29. public string Value { get; set; }
  30. /// <summary>
  31. /// 节点编码
  32. ///</summary>
  33. [SugarColumn(ColumnName = "code", ColumnDescription = "节点编码", Length = 100)]
  34. [MaxLength(100)]
  35. public string Code { get; set; }
  36. /// <summary>
  37. /// 排序
  38. ///</summary>
  39. [SugarColumn(ColumnName = "order", ColumnDescription = "排序")]
  40. public int Order { get; set; }
  41. /// <summary>
  42. /// 备注
  43. ///</summary>
  44. [SugarColumn(ColumnName = "remark", ColumnDescription = "备注", Length = 200)]
  45. [MaxLength(200)]
  46. public string Remark { get; set; }
  47. /// <summary>
  48. /// 状态
  49. ///</summary>
  50. [SugarColumn(ColumnName = "status", ColumnDescription = "状态")]
  51. public StatusEnum Status { get; set; } = StatusEnum.Enable;
  52. /// <summary>
  53. /// 数据资源子项
  54. /// </summary>
  55. [SugarColumn(IsIgnore = true)]
  56. public List<SysDistrict> Children { get; set; }
  57. }
  58. }