Skip to content

Commit

Permalink
Merge pull request #400 from JNU-econovation/refactor/#392
Browse files Browse the repository at this point in the history
[BE/REFACTOR] dto 패키지 이동
  • Loading branch information
LJH098 authored Jul 17, 2024
2 parents 4465370 + 1614244 commit 35a54fa
Show file tree
Hide file tree
Showing 96 changed files with 176 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.docs.auth.AuthExceptionDocs;
import com.gaebaljip.exceed.common.dto.LoginResponseDTO;
import com.gaebaljip.exceed.adapter.in.auth.request.LoginRequest;
import com.gaebaljip.exceed.common.security.AuthConstants;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.LoginResponseDTO;
import com.gaebaljip.exceed.dto.request.LoginRequest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.auth.request;

import javax.validation.constraints.Email;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import com.gaebaljip.exceed.common.ApiResponse.CustomBody;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.dto.request.CreateFoodRequest;
import com.gaebaljip.exceed.adapter.in.food.request.CreateFoodRequest;

import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import com.gaebaljip.exceed.application.port.in.food.GetFoodQuery;
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.dto.response.GetFoodResponse;
import com.gaebaljip.exceed.dto.response.GetFoodsAutoResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetFoodResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetFoodsAutoResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.dto.response.GetOwnFoodResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetOwnFoodResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.food.request;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.food.response;

import com.gaebaljip.exceed.adapter.out.jpa.food.FoodEntity;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.food.response;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.food.response;

public record GetOwnFoodResponse(Long foodId, String name) {
public static GetOwnFoodResponse of(Long foodId, String name) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.common.docs.meal.EatMealExceptionDocs;
import com.gaebaljip.exceed.adapter.in.meal.request.EatMealRequest;
import com.gaebaljip.exceed.adapter.in.meal.response.EatMealResponse;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.request.EatMealRequest;
import com.gaebaljip.exceed.dto.response.EatMealResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.common.docs.meal.GetMealExceptionDocs;
import com.gaebaljip.exceed.common.docs.meal.GetMealFoodExceptionDocs;
import com.gaebaljip.exceed.common.dto.*;
import com.gaebaljip.exceed.adapter.in.nutritionist.request.GetAllAnalysisRequest;
import com.gaebaljip.exceed.adapter.in.meal.response.GetMealFoodResponse;
import com.gaebaljip.exceed.adapter.in.meal.response.GetMealResponse;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.*;
import com.gaebaljip.exceed.dto.request.GetAllAnalysisRequest;
import com.gaebaljip.exceed.dto.response.*;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.gaebaljip.exceed.adapter.in.meal.request;

import java.util.List;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.gaebaljip.exceed.application.domain.meal.MealType;
import com.gaebaljip.exceed.common.ValidationMessage;
import com.gaebaljip.exceed.common.annotation.Enum;
import com.gaebaljip.exceed.common.dto.EatMealFoodDTO;

import lombok.Builder;

public record EatMealRequest(
@Valid List<EatMealFoodDTO> eatMealFoodDTOS,
@Enum(enumClass = MealType.class) String mealType,
@NotBlank(message = "파일명을 " + ValidationMessage.NOT_BLANK) String fileName) {
@Builder
public EatMealRequest {}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.meal.response;

import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.meal.response;

import java.util.List;

import com.gaebaljip.exceed.dto.AllAnalysisDTO;
import com.gaebaljip.exceed.dto.MealRecordDTO;
import com.gaebaljip.exceed.adapter.in.meal.response.GetMealResponse;
import com.gaebaljip.exceed.common.dto.AllAnalysisDTO;
import com.gaebaljip.exceed.common.dto.MealRecordDTO;

import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.meal.response;

import com.gaebaljip.exceed.dto.CurrentMealDTO;
import com.gaebaljip.exceed.dto.MaintainMealDTO;
import com.gaebaljip.exceed.dto.TargetMealDTO;
import com.gaebaljip.exceed.common.dto.CurrentMealDTO;
import com.gaebaljip.exceed.common.dto.MaintainMealDTO;
import com.gaebaljip.exceed.common.dto.TargetMealDTO;

public record GetMealResponse(
MaintainMealDTO maintainMealDTO,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import com.gaebaljip.exceed.application.port.in.member.CheckCodeUsecase;
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.dto.request.CheckMemberRequest;
import com.gaebaljip.exceed.adapter.in.member.request.CheckMemberRequest;

import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.dto.response.GetWeightResponse;
import com.gaebaljip.exceed.adapter.in.member.response.GetWeightResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.common.docs.member.OnBoardingMemberExceptionDocs;
import com.gaebaljip.exceed.adapter.in.member.request.OnBoardingMemberRequest;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.request.OnBoardingMemberRequest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
import com.gaebaljip.exceed.common.ApiResponse.CustomBody;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.docs.member.SignUpMemberExceptionDocs;
import com.gaebaljip.exceed.adapter.in.member.request.SignUpMemberRequest;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.request.SignUpMemberRequest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.common.docs.member.UpdateMemberExceptionDocs;
import com.gaebaljip.exceed.adapter.in.member.request.UpdateMemberRequest;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.request.UpdateMemberRequest;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
import com.gaebaljip.exceed.common.ApiResponse;
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.adapter.in.member.request.UpdateWeightRequest;
import com.gaebaljip.exceed.adapter.in.member.response.UpdateWeightResponse;
import com.gaebaljip.exceed.common.event.Events;
import com.gaebaljip.exceed.common.event.UpdateWeightEvent;
import com.gaebaljip.exceed.dto.request.UpdateWeightRequest;
import com.gaebaljip.exceed.dto.response.UpdateWeightResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.member.request;

import javax.validation.constraints.NotNull;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.member.request;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.member.request;

import javax.validation.constraints.Email;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.member.request;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.member.request;

import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.member.response;

public record GetWeightResponse(Double weight, Double targetWeight) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.response;
package com.gaebaljip.exceed.adapter.in.member.response;

import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
import com.gaebaljip.exceed.common.ApiResponseGenerator;
import com.gaebaljip.exceed.common.annotation.AuthenticationMemberId;
import com.gaebaljip.exceed.common.docs.nutritionist.GetAnalysisExceptionDocs;
import com.gaebaljip.exceed.adapter.in.nutritionist.request.GetCalorieAnalysisRequest;
import com.gaebaljip.exceed.adapter.in.nutritionist.response.GetCalorieAnalysisResponse;
import com.gaebaljip.exceed.common.swagger.ApiErrorExceptionsExample;
import com.gaebaljip.exceed.dto.request.GetCalorieAnalysisRequest;
import com.gaebaljip.exceed.dto.response.GetCalorieAnalysisResponse;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.nutritionist.request;

import java.time.LocalDateTime;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.gaebaljip.exceed.dto.request;
package com.gaebaljip.exceed.adapter.in.nutritionist.request;

import java.time.LocalDateTime;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package com.gaebaljip.exceed.adapter.in.nutritionist.response;

import java.util.List;

import com.gaebaljip.exceed.common.dto.CalorieAnalysisDTO;

public record GetCalorieAnalysisResponse(List<CalorieAnalysisDTO> calorieAnalysisDTOS) {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import org.springframework.stereotype.Repository;

import com.gaebaljip.exceed.dto.PageableFoodDTO;
import com.gaebaljip.exceed.common.dto.PageableFoodDTO;
import com.querydsl.core.types.dsl.BooleanExpression;
import com.querydsl.jpa.impl.JPAQueryFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
import com.gaebaljip.exceed.application.port.out.meal.MealConverter;
import com.gaebaljip.exceed.application.port.out.meal.MealPort;
import com.gaebaljip.exceed.common.annotation.Timer;
import com.gaebaljip.exceed.dto.MonthlyMealDTO;
import com.gaebaljip.exceed.dto.TodayMealDTO;
import com.gaebaljip.exceed.common.dto.MonthlyMealDTO;
import com.gaebaljip.exceed.common.dto.TodayMealDTO;

import lombok.RequiredArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import java.util.List;

import com.gaebaljip.exceed.application.domain.meal.Meal;
import com.gaebaljip.exceed.dto.MonthlyMealDTO;
import com.gaebaljip.exceed.common.dto.MonthlyMealDTO;

public interface MonthlyMealPort {
List<Meal> query(MonthlyMealDTO monthlyMealDTO);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

import com.gaebaljip.exceed.adapter.out.jpa.food.FoodEntity;
import com.gaebaljip.exceed.common.BaseEntity;
import com.gaebaljip.exceed.common.dto.EatMealFoodDTO;
import com.gaebaljip.exceed.common.exception.food.FoodNotFoundException;
import com.gaebaljip.exceed.common.exception.nutritionist.MealNotFoundException;
import com.gaebaljip.exceed.dto.EatMealFoodDTO;

import lombok.*;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.springframework.stereotype.Component;

import com.gaebaljip.exceed.dto.LoginResponseDTO;
import com.gaebaljip.exceed.dto.request.LoginRequest;
import com.gaebaljip.exceed.common.dto.LoginResponseDTO;
import com.gaebaljip.exceed.adapter.in.auth.request.LoginRequest;

@Component
public interface AuthUsecase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.springframework.stereotype.Component;

import com.gaebaljip.exceed.dto.request.CreateFoodRequest;
import com.gaebaljip.exceed.adapter.in.food.request.CreateFoodRequest;

@Component
public interface CreateFoodUseCase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import org.springframework.stereotype.Component;

import com.gaebaljip.exceed.dto.response.GetFoodResponse;
import com.gaebaljip.exceed.dto.response.GetFoodsAutoResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetFoodResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetFoodsAutoResponse;

@Component
public interface GetFoodQuery {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import java.util.List;

import com.gaebaljip.exceed.dto.response.GetOwnFoodResponse;
import com.gaebaljip.exceed.adapter.in.food.response.GetOwnFoodResponse;

public interface GetOwnFoodUseCase {
List<GetOwnFoodResponse> execute(Long memberId);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package com.gaebaljip.exceed.application.port.in.meal;

import java.util.List;

import com.gaebaljip.exceed.adapter.in.meal.request.EatMealRequest;
import com.gaebaljip.exceed.application.domain.meal.MealType;
import com.gaebaljip.exceed.common.dto.EatMealFoodDTO;
import com.gaebaljip.exceed.common.exception.meal.InvalidGException;
import com.gaebaljip.exceed.common.exception.meal.InvalidMultipleAndGException;
import com.gaebaljip.exceed.common.exception.meal.InvalidMultipleException;
import com.gaebaljip.exceed.dto.EatMealFoodDTO;
import com.gaebaljip.exceed.dto.request.EatMealRequest;

import lombok.Builder;

import java.util.List;

@Builder
public record EatMealCommand(
List<EatMealFoodDTO> eatMealFoodDTOS, Long memberId, MealType mealType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import org.springframework.stereotype.Component;

import com.gaebaljip.exceed.dto.CurrentMealDTO;
import com.gaebaljip.exceed.common.dto.CurrentMealDTO;

@Component
public interface GetCurrentMealQuery {
Expand Down
Loading

0 comments on commit 35a54fa

Please sign in to comment.