forked from gutanbug/renew-sw-mentoring
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from kjungw1025/fix/post
�fix: 미션 인증글, 공지글 response dto 수정
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...com/renew/sw/mentoring/domain/post/model/entity/dto/response/ResponseMissionBoardDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,30 @@ | ||
package com.renew.sw.mentoring.domain.post.model.entity.dto.response; | ||
|
||
import com.renew.sw.mentoring.domain.post.model.entity.RegisterStatus; | ||
import com.renew.sw.mentoring.domain.post.model.entity.type.MissionBoard; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ResponseMissionBoardDto extends ResponseSingleGenericPostDto { | ||
|
||
@Schema(description = "댓글 개수", example = "4") | ||
private final int commentCount; | ||
|
||
@Schema(description = "게시글 상태", example = "IN_PROGRESS") | ||
private final RegisterStatus registerStatus; | ||
|
||
@Schema(description = "미션 아이디", example = "1") | ||
private final Long missionId; | ||
|
||
@Schema(description = "보너스 미션 성공 여부", example = "false") | ||
private final boolean bonusMissionSuccessful; | ||
|
||
public ResponseMissionBoardDto(ResponseSingleGenericPostDto dto, MissionBoard post) { | ||
super(dto); | ||
this.commentCount = post.getComments().size(); | ||
this.registerStatus = post.getRegisterStatus(); | ||
this.missionId = post.getMissionId(); | ||
this.bonusMissionSuccessful = post.isBonusMissionSuccessful(); | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
...com/renew/sw/mentoring/domain/post/model/entity/dto/response/ResponseSingleNoticeDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
package com.renew.sw.mentoring.domain.post.model.entity.dto.response; | ||
|
||
import com.renew.sw.mentoring.domain.post.model.entity.type.Notice; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class ResponseSingleNoticeDto extends ResponseSingleGenericPostDto { | ||
|
||
@Schema(description = "댓글 개수", example = "4") | ||
private final int commentCount; | ||
|
||
public ResponseSingleNoticeDto(ResponseSingleGenericPostDto dto, Notice notice) { | ||
super(dto); | ||
this.commentCount = notice.getComments().size(); | ||
} | ||
} |