Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/#65 ChallengePopupType 제거 #66

Merged
merged 6 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ public class ArticleRetrieveService {

public ArticleSummaryResponse findArticlesByCategory(Long memberId, Category category) {

List<ArticleSummaryDto> categoryArticles = formatSummaryArticleDtos(memberId,
List<ArticleSummaryDto> articleSummaries = formatSummaryArticleDtos(memberId,
articleRepository.findArticlesByCategory(category));

Collections.shuffle(categoryArticles);
return ArticleSummaryResponse.of(categoryArticles);
Collections.shuffle(articleSummaries);
return ArticleSummaryResponse.of(articleSummaries);
}

public TodayArticleResponse findTodayArticleByMemberId(Long memberId) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
public class ArticleSummaryResponse {

@Schema(description = "아티클 요약 정보")
private List<ArticleSummaryDto> categoryArticles;
private List<ArticleSummaryDto> articleSummaries;

public static ArticleSummaryResponse of(List<ArticleSummaryDto> categoryArticles) {
public static ArticleSummaryResponse of(List<ArticleSummaryDto> articleSummaries) {
return ArticleSummaryResponse
.builder()
.categoryArticles(categoryArticles)
.articleSummaries(articleSummaries)
.build();
}
}
1 change: 0 additions & 1 deletion lionheart-api/src/main/resources/sql/schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ CREATE TABLE `CHALLENGE`
`CHALLENGE_ID` bigint auto_increment primary key,
`MEMBER_ID` bigint NOT NULL,
`LEVEL` varchar(30) NOT NULL,
`POPUP` varchar(30) NOT NULL,
`CREATED_AT` datetime NOT NULL,
`MODIFIED_AT` datetime NOT NULL
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,12 @@ public class Challenge extends BaseEntity {
@Enumerated(EnumType.STRING)
private ChallengeLevelType level;

@Column(name = "POPUP", nullable = false, length = 30)
@Enumerated(EnumType.STRING)
private ChallengePopupType popup;

private static final int LEVEL_UP_STANDARD = 5;

public static Challenge newInstance(Member member) {
return Challenge.builder()
.member(member)
.level(ChallengeLevelType.LEVEL_ONE)
.popup(ChallengePopupType.START)
.build();
}

Expand Down

This file was deleted.