Skip to content

Commit

Permalink
fix: post Dto 복구 (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
selfishAltruism committed Mar 3, 2024
1 parent b422676 commit 7959229
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/@types/post.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
16 changes: 8 additions & 8 deletions src/stores/models/PostModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand All @@ -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 {
Expand Down

0 comments on commit 7959229

Please sign in to comment.