baseModel.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import type { Result } from '@jeesite/types/axios';
  2. /**
  3. * Copyright (c) 2013-Now https://jeesite.com All rights reserved.
  4. * No deletion without permission, or be held responsible to law.
  5. * @author ThinkGem
  6. */
  7. export interface Page<T> {
  8. pageNo: number;
  9. current: number;
  10. size: number;
  11. pageSize: number;
  12. orderBy: string;
  13. count: number;
  14. records: T[];
  15. }
  16. export interface BasicModel<T> extends Result, Recordable {
  17. id?: string;
  18. page: Page<T>;
  19. isNewRecord: boolean;
  20. dataMap: Map<string, any>;
  21. createBy?: string;
  22. createDate?: string;
  23. updateBy?: string;
  24. updateDate?: string;
  25. status?: string;
  26. }
  27. export interface TreeModel<T> extends BasicModel<T> {
  28. parentCode?: string; // 父级编码
  29. parentCodes?: string; // 所有父级编号
  30. treeNames?: string; // 全节点名
  31. treeSort?: string; // 排序号
  32. treeSorts?: string; // 所有排序号
  33. treeLeaf?: string; // 是否叶子节点
  34. treeLevel?: number; // 树层次级别(从0开始)
  35. childList?: T[]; // 子项列表
  36. isRoot?: boolean; // 是否根节点
  37. isTreeLeaf?: boolean; // 是否叶子
  38. isLoading?: boolean; // 是否加载中
  39. }
  40. export interface TreeDataModel {
  41. id: string;
  42. pId: string;
  43. name: string;
  44. value?: string;
  45. title?: string;
  46. }