| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import { IUser } from './user';
- export enum ShareType {
- PROJECT = 1, // 项目
- RATION_LIB, // 定额库
- GLJ_LIB, // 工料机库
- PRICE_TEMPLATE, // 租价模板
- }
- // 分享权限
- export interface ISharePermission {
- allowCopy: boolean;
- allowCooperate: boolean;
- }
- export interface IShareProject extends ISharePermission {
- shareDate?: number;
- updateDate?: number;
- projectID: string; // 项目ID
- compilationID: string;
- isRead?: boolean;
- }
- export interface IShareLib extends ISharePermission {
- shareDate?: number;
- updateDate?: number;
- compilationID: string;
- }
- export interface IShare {
- ID: string;
- owner: string;
- receiver: string;
- recentDate: number;
- projectList: IShareProject[];
- rationLibList: IShareLib[];
- gljLibList: IShareLib[];
- priceTemplateList: IShareLib[];
- }
- export type ShareItem = IShareProject | IShareLib;
- // 分享历史
- export interface IShareHistory extends ISharePermission {
- ID: string; // 分享ID
- user: IUser;
- shareType: ShareType;
- projectID?: string;
- compilationID?: string;
- }
- export interface ICreatShare {
- receiver: string;
- doc: ShareItem;
- type: ShareType;
- }
- export interface IUpdateShare {
- filter: { ID: string; projectID?: string; compilationID?: string };
- update: {
- updateDate?: number;
- isRead?: boolean;
- allowCopy?: boolean;
- allowCooperate?: boolean;
- };
- type: ShareType;
- }
- export interface IDelShare {
- filter: { ID: string; projectID?: string; compilationID?: string };
- type: ShareType;
- }
- export interface IBulkShare {
- update?: IUpdateShare[];
- create?: ICreatShare[];
- remove?: IDelShare[];
- }
|