TreeEntity.cs 780 B

12345678910111213141516171819202122232425262728293031323334
  1. // <author></author>
  2. // <date></date>
  3. // <description></description>
  4. using System.ComponentModel.DataAnnotations.Schema;
  5. namespace ERP.Framework.WebApi
  6. {
  7. public class TreeEntity<T> : BaseEntity where T : class
  8. {
  9. /// <summary>
  10. /// 父Id
  11. /// </summary>
  12. public virtual long ParentId { get; set; }
  13. /// <summary>
  14. /// 树级
  15. /// </summary>
  16. public virtual int NodeLevel { get; set; }
  17. /// <summary>
  18. /// 排序数
  19. /// </summary>
  20. public virtual int OrderNum { get; set; }
  21. /// <summary>
  22. /// 祖级列表
  23. /// </summary>
  24. public virtual string? TreeIds { get; set; }
  25. [NotMapped]
  26. public virtual List<T>? Children { get; set; }
  27. }
  28. }