This repository has been archived by the owner on Oct 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* develop: [POTATO-50] QueryProjection 방식으로 리팩토링. UPDATE README.md v1.0.2
- Loading branch information
Showing
9 changed files
with
168 additions
and
70 deletions.
There are no files selected for viewing
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,6 +1,6 @@ | ||
# Potato Backend | ||
|
||
![Generic badge](https://img.shields.io/badge/version-1.0.1-orange.svg) | ||
![Generic badge](https://img.shields.io/badge/version-1.0.2-orange.svg) | ||
[![codecov](https://codecov.io/gh/steamed-potatoes/potato-backend/branch/develop/graph/badge.svg?token=ACoWRzqGBl)](https://codecov.io/gh/steamed-potatoes/potato-backend) | ||
|
||
--- | ||
|
@@ -85,3 +85,8 @@ docker-compose up --build | |
|
||
## Contacts | ||
- [email protected] | ||
|
||
--- | ||
|
||
License | ||
Potato Backend is MIT licensed. |
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
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
78 changes: 78 additions & 0 deletions
78
...pi/service/board/organization/dto/response/OrganizationBoardWithOrganizationResponse.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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.potato.api.service.board.organization.dto.response; | ||
|
||
import com.potato.api.service.common.dto.response.BaseTimeResponse; | ||
import com.potato.domain.domain.board.organization.OrganizationBoardCategory; | ||
import com.potato.domain.domain.board.organization.repository.dto.BoardWithOrganizationDto; | ||
import com.potato.domain.domain.organization.OrganizationCategory; | ||
import lombok.AccessLevel; | ||
import lombok.Builder; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
import lombok.ToString; | ||
|
||
import java.time.LocalDateTime; | ||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
@ToString | ||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class OrganizationBoardWithOrganizationResponse extends BaseTimeResponse { | ||
|
||
private String orgSubDomain; | ||
private String orgName; | ||
private OrganizationCategory orgCategory; | ||
private String orgProfileUrl; | ||
private String orgDescription; | ||
private int orgMembersCount; | ||
private int orgFollowersCount; | ||
|
||
private Long boardId; | ||
private String boardTitle; | ||
private String boardContent; | ||
private OrganizationBoardCategory boardCategory; | ||
private LocalDateTime boardStartDateTime; | ||
private LocalDateTime boardEndDateTime; | ||
private final List<String> imageUrls = new ArrayList<>(); | ||
|
||
@Builder | ||
public OrganizationBoardWithOrganizationResponse(String orgSubDomain, String orgName, OrganizationCategory orgCategory, | ||
String orgProfileUrl, String orgDescription, int orgMembersCount, int orgFollowersCount, | ||
Long boardId, String boardTitle, String boardContent, OrganizationBoardCategory boardCategory, | ||
LocalDateTime boardStartDateTime, LocalDateTime boardEndDateTime) { | ||
this.orgSubDomain = orgSubDomain; | ||
this.orgName = orgName; | ||
this.orgCategory = orgCategory; | ||
this.orgProfileUrl = orgProfileUrl; | ||
this.orgDescription = orgDescription; | ||
this.orgMembersCount = orgMembersCount; | ||
this.orgFollowersCount = orgFollowersCount; | ||
this.boardId = boardId; | ||
this.boardTitle = boardTitle; | ||
this.boardContent = boardContent; | ||
this.boardCategory = boardCategory; | ||
this.boardStartDateTime = boardStartDateTime; | ||
this.boardEndDateTime = boardEndDateTime; | ||
} | ||
|
||
public static OrganizationBoardWithOrganizationResponse of(BoardWithOrganizationDto dto, List<String> imageUrls) { | ||
OrganizationBoardWithOrganizationResponse response = OrganizationBoardWithOrganizationResponse.builder() | ||
.orgSubDomain(dto.getOrgSubDomain()) | ||
.orgName(dto.getOrgName()) | ||
.orgCategory(dto.getOrgCategory()) | ||
.orgProfileUrl(dto.getOrgProfileUrl()) | ||
.orgDescription(dto.getOrgDescription()) | ||
.orgMembersCount(dto.getOrgMembersCount()) | ||
.orgFollowersCount(dto.getOrgFollowersCount()) | ||
.boardId(dto.getBoardId()) | ||
.boardTitle(dto.getBoardTitle()) | ||
.boardContent(dto.getBoardContent()) | ||
.boardCategory(dto.getBoardCategory()) | ||
.boardStartDateTime(dto.getBoardStartDateTime()) | ||
.boardEndDateTime(dto.getBoardEndDateTime()) | ||
.build(); | ||
response.setBaseTime(dto.getCreatedDateTime(), dto.getLastModifiedDateTime()); | ||
return response; | ||
} | ||
|
||
} |
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
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
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
Oops, something went wrong.