From 795922989e7d5584a111a5d3b39e305038ef84a9 Mon Sep 17 00:00:00 2001 From: selfishAltruism Date: Sun, 3 Mar 2024 14:22:12 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20post=20Dto=20=EB=B3=B5=EA=B5=AC=20(#83)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/@types/post.d.ts | 8 ++++---- src/stores/models/PostModel.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/@types/post.d.ts b/src/@types/post.d.ts index 5c24ba23..9177e241 100644 --- a/src/@types/post.d.ts +++ b/src/@types/post.d.ts @@ -5,14 +5,14 @@ declare namespace Post { writerName: string; writerAdmissionYear: number; writerProfileImage: string | null; - //content: string; + content: string; createdAt: Date; updatedAt: Date; numComment: number; - //updatable: boolean; - //deletable: boolean; + updatable: boolean; + deletable: boolean; isDeleted: boolean; - //attachmentList: IAttachment[]; + attachmentList: IAttachment[]; } export interface FindAllResponseDto { diff --git a/src/stores/models/PostModel.ts b/src/stores/models/PostModel.ts index 0d9c0009..4e285bd4 100644 --- a/src/stores/models/PostModel.ts +++ b/src/stores/models/PostModel.ts @@ -7,14 +7,14 @@ export class PostModel { id: string; title: string; author: Model.Author; - //content: string; + content: string; createdAt: Date; updatedAt: Date; commentCount: number; - //updatable: boolean; - //deletable: boolean; + updatable: boolean; + deletable: boolean; isDeleted: boolean; - //attachmentList: Post.IAttachment[]; + attachmentList: Post.IAttachment[]; constructor(props: Post.Dto) { makeObservable(this, { @@ -29,14 +29,14 @@ export class PostModel { props.writerName, props.writerProfileImage, ); - //this.content = props.content ?? ''; + this.content = props.content ?? ''; this.createdAt = props.createdAt; this.updatedAt = props.updatedAt; this.commentCount = props.numComment; - //this.updatable = props.updatable ?? false; - //this.deletable = props.deletable ?? false; + this.updatable = props.updatable ?? false; + this.deletable = props.deletable ?? false; this.isDeleted = props.isDeleted; - //this.attachmentList = props.attachmentList; + this.attachmentList = props.attachmentList; } setCommentCount(param: (num: number) => number | number): void {