diff --git a/backend/libs/database/post.entity.ts b/backend/libs/database/post.entity.ts index f58dc2a..739d593 100644 --- a/backend/libs/database/post.entity.ts +++ b/backend/libs/database/post.entity.ts @@ -22,6 +22,9 @@ export class Post { @Column({ type: 'timestamptz' }) public timestamp!: Date; + @Column({ type: 'timestamptz', nullable: true }) + public edit_timestamp?: Date; + @Column({ nullable: false }) public from_user_id!: string; diff --git a/backend/src/modules/post/post.service.ts b/backend/src/modules/post/post.service.ts index 34045e1..4b714b4 100644 --- a/backend/src/modules/post/post.service.ts +++ b/backend/src/modules/post/post.service.ts @@ -41,7 +41,7 @@ export class PostService { } if (post.text !== data.text) { post.text = data.text; - post.timestamp = new Date(); + post.edit_timestamp = new Date(); await this.postRepository.save(post); } return post;