2022-03-12 02:31:03 +00:00
|
|
|
import { IUser } from './user';
|
|
|
|
import { IWiki } from './wiki';
|
2022-03-11 05:57:55 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 文档状态枚举
|
|
|
|
*/
|
|
|
|
export enum DocumentStatus {
|
2022-03-12 02:31:03 +00:00
|
|
|
private = 'private',
|
|
|
|
public = 'public',
|
2022-03-11 05:57:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 文档数据定义
|
|
|
|
*/
|
|
|
|
export interface IDocument {
|
|
|
|
id: string;
|
2022-03-12 02:31:03 +00:00
|
|
|
wikiId: IWiki['id'];
|
2022-03-11 05:57:55 +00:00
|
|
|
isWikiHome: boolean;
|
2022-03-12 02:31:03 +00:00
|
|
|
createUserId: IUser['id'];
|
2022-03-11 05:57:55 +00:00
|
|
|
createUser: IUser;
|
2022-03-12 02:31:03 +00:00
|
|
|
parentDocumentId?: IDocument['id'];
|
2022-03-11 05:57:55 +00:00
|
|
|
title: string;
|
|
|
|
content: string;
|
|
|
|
status: DocumentStatus;
|
|
|
|
views: number;
|
|
|
|
sharePassword?: string;
|
|
|
|
createdAt: Date;
|
|
|
|
updatedAt: Date;
|
|
|
|
children?: IDocument[];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 文档成员权限数据定义
|
|
|
|
*/
|
|
|
|
export interface IAuthority {
|
|
|
|
id: string;
|
2022-03-12 02:31:03 +00:00
|
|
|
documentId: IDocument['id'];
|
|
|
|
userId: IUser['id'];
|
2022-03-11 05:57:55 +00:00
|
|
|
readable: boolean;
|
|
|
|
editable: boolean;
|
|
|
|
}
|