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

43 lines
923 B
TypeScript
Raw Normal View History

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