PagerInfo.cs 953 B

12345678910111213141516171819202122232425262728293031323334353637
  1. namespace Model.Base
  2. {
  3. public class PagerInfo
  4. {
  5. /// <summary>
  6. /// 当前页码
  7. /// </summary>
  8. public int pageNum { get; set; }
  9. /// <summary>
  10. /// 每页显示多少条
  11. /// </summary>
  12. public int pageSize { get; set; }
  13. /// <summary>
  14. /// 总记录数
  15. /// </summary>
  16. public int totalNum { get; set; }
  17. /// <summary>
  18. /// 排序字段
  19. /// </summary>
  20. public string sort { get; set; } = string.Empty;
  21. /// <summary>
  22. /// 排序类型,前端传入的是"ascending","descending"
  23. /// </summary>
  24. public string sortType { get; set; } = string.Empty;
  25. public PagerInfo()
  26. {
  27. pageNum = 1;
  28. pageSize = 20;
  29. }
  30. public PagerInfo(int page = 1, int pageSize = 20)
  31. {
  32. pageNum = page;
  33. pageSize = pageSize;
  34. }
  35. }
  36. }