feat: comments

* create comment
* reply to comment thread
* edit comment
* delete comment
* resolve comment
This commit is contained in:
Philipinho
2023-11-09 16:52:34 +00:00
parent dea2cad89c
commit 4cb7a56f65
49 changed files with 1486 additions and 87 deletions

View File

@@ -11,6 +11,7 @@ import {
} from 'typeorm';
import { User } from '../../user/entities/user.entity';
import { Workspace } from '../../workspace/entities/workspace.entity';
import { Comment } from '../../comment/entities/comment.entity';
@Entity('pages')
export class Page {
@@ -68,7 +69,7 @@ export class Page {
status: string;
@Column({ type: 'date', nullable: true })
publishedAt: string;
publishedAt: Date;
@CreateDateColumn()
createdAt: Date;
@@ -85,4 +86,7 @@ export class Page {
@OneToMany(() => Page, (page) => page.parentPage, { onDelete: 'CASCADE' })
childPages: Page[];
@OneToMany(() => Comment, (comment) => comment.page)
comments: Comment[];
}