Skip to content

Commit

Permalink
feat: Add rule in mission category response (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
2zerozu authored Jul 15, 2023
1 parent 67e9df9 commit 792c681
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ public class MissionCategory {
@Column(name = "description", nullable = false)
private String description;

@Column(name = "rule", nullable = false)
private String rule;

@Column(name = "tip", nullable = false)
private String tip;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@

import lombok.Builder;

@JsonPropertyOrder({"id", "title", "description", "tip", "image", "missionContentList"})
@JsonPropertyOrder({"id", "title", "description", "rule", "tip", "image", "missionContentList"})
@Builder
public record MissionCategoryResponseDto(
Long id,
String title,
String description,
String rule,
String tip,
String image,
List<MissionContentDto> missionContentList
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/universe/uni/service/MissionService.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.universe.uni.service;

import static com.universe.uni.exception.dto.ErrorType.*;
import static com.universe.uni.exception.dto.ErrorType.NOT_FOUND_MISSION_CATEGORY_EXCEPTION;
import static com.universe.uni.exception.dto.ErrorType.NOT_FOUND_MISSION_CONTENT;

import java.util.List;
import java.util.Random;
Expand Down Expand Up @@ -71,6 +72,7 @@ private MissionCategoryResponseDto fromMissionCategoryToMissionCategoryResponseD
.id(missionCategory.getId())
.title(missionCategory.getTitle())
.description(missionCategory.getDescription())
.rule(missionCategory.getRule())
.tip(missionCategory.getTip())
.image(missionCategory.getImage())
.missionContentList(missionContentDtoList)
Expand Down

0 comments on commit 792c681

Please sign in to comment.