share.ts 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. export enum ShareType {
  2. PROJECT = 1, // 项目
  3. RATION_LIB, // 定额库
  4. GLJ_LIB, // 工料机库
  5. PRICE_TEMPLATE, // 租价模板
  6. }
  7. export interface IShareProject {
  8. shareDate?: number;
  9. updateDate?: number;
  10. projectID: string; // 项目ID
  11. isRead?: boolean;
  12. allowCopy: boolean;
  13. allowCooperate: boolean;
  14. }
  15. export interface IShareLib {
  16. shareDate?: number;
  17. updateDate?: number;
  18. compilationID: string;
  19. allowCopy: boolean;
  20. allowCooperate: boolean;
  21. }
  22. export interface IShare {
  23. ID: string;
  24. owner: string;
  25. receiver: string;
  26. recentDate: number;
  27. projectList: IShareProject[];
  28. rationLibList: IShareLib[];
  29. gljLibList: IShareLib[];
  30. priceTemplateList: IShareLib[];
  31. }
  32. export type ShareItem = IShareProject | IShareLib;
  33. export interface ICreatShare {
  34. doc: ShareItem;
  35. type: ShareType;
  36. }
  37. export interface IUpdateShare {
  38. filter: { projectID?: string; compilationID?: string };
  39. update: {
  40. updateDate?: number;
  41. isRead?: boolean;
  42. allowCopy?: boolean;
  43. allowCooperate?: boolean;
  44. };
  45. type: ShareType;
  46. }
  47. export interface IDelShare {
  48. filter: { projectID?: string; compilationID?: string };
  49. type: ShareType;
  50. }