think/packages/domains/lib/models/document.d.ts

41 lines
834 B
TypeScript
Raw Normal View History

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-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
}