2022-06-30 00:03:02 +08:00
|
|
|
import { IOrganization } from './organization';
|
2022-04-02 17:57:30 +08:00
|
|
|
import { IUser } from './user';
|
|
|
|
import { IWiki } from './wiki';
|
2022-05-18 16:02:29 +08:00
|
|
|
/**
|
|
|
|
* 文档状态枚举
|
|
|
|
*/
|
2022-03-11 13:57:55 +08:00
|
|
|
export declare enum DocumentStatus {
|
|
|
|
private = "private",
|
|
|
|
public = "public"
|
|
|
|
}
|
2022-05-18 16:02:29 +08:00
|
|
|
/**
|
|
|
|
* 文档数据定义
|
|
|
|
*/
|
2022-03-11 13:57:55 +08:00
|
|
|
export interface IDocument {
|
|
|
|
id: string;
|
2022-06-30 00:03:02 +08:00
|
|
|
organizationId: IOrganization['id'];
|
2022-04-02 17:57:30 +08:00
|
|
|
wikiId: IWiki['id'];
|
2022-03-11 13:57:55 +08:00
|
|
|
isWikiHome: boolean;
|
2022-04-02 17:57:30 +08:00
|
|
|
createUserId: IUser['id'];
|
2022-03-11 13:57:55 +08:00
|
|
|
createUser: IUser;
|
2022-04-02 17:57:30 +08:00
|
|
|
parentDocumentId?: IDocument['id'];
|
2022-03-11 13:57:55 +08:00
|
|
|
title: string;
|
|
|
|
content: string;
|
2022-04-02 17:57:30 +08:00
|
|
|
state: Uint8Array;
|
2022-03-11 13:57:55 +08:00
|
|
|
status: DocumentStatus;
|
|
|
|
views: number;
|
|
|
|
sharePassword?: string;
|
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
|
|
|
children?: IDocument[];
|
|
|
|
}
|
2022-05-18 16:02:29 +08:00
|
|
|
/**
|
|
|
|
* 文档成员权限数据定义
|
|
|
|
*/
|
2022-03-11 13:57:55 +08:00
|
|
|
export interface IAuthority {
|
|
|
|
id: string;
|
2022-04-02 17:57:30 +08:00
|
|
|
documentId: IDocument['id'];
|
|
|
|
userId: IUser['id'];
|
2022-03-11 13:57:55 +08:00
|
|
|
readable: boolean;
|
|
|
|
editable: boolean;
|
2022-04-05 13:33:45 +08:00
|
|
|
createUserId: IUser['id'];
|
2022-03-11 13:57:55 +08:00
|
|
|
}
|