Skip to content

Commit

Permalink
Merge pull request #74 from KNU-HAEDAL/package
Browse files Browse the repository at this point in the history
Package
  • Loading branch information
bayy1216 authored Sep 3, 2024
2 parents 051c07e + 9c6d0ed commit 06a4e9c
Show file tree
Hide file tree
Showing 108 changed files with 363 additions and 382 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package org.haedal.zzansuni.controller.admin;
package org.haedal.zzansuni.admin.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.controller.auth.AuthReq;
import org.haedal.zzansuni.auth.controller.AuthReq;
import org.haedal.zzansuni.auth.domain.AuthService;
import org.haedal.zzansuni.challengegroup.domain.application.ChallengeGroupService;
import org.haedal.zzansuni.core.api.ApiResponse;
import org.haedal.zzansuni.domain.auth.AuthService;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeGroupService;
import org.springframework.http.HttpStatus;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;

@Tag(name = "admin", description = "관리자 API")
Expand All @@ -19,7 +18,6 @@ public class AdminController {

private final AuthService authService;
private final ChallengeGroupService challengeGroupService;
private final BCryptPasswordEncoder passwordEncoder;

@ResponseStatus(HttpStatus.CREATED)
@Operation(summary = "매니저 등록", description = "매니저를 등록한다.")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.haedal.zzansuni.controller.admin;
package org.haedal.zzansuni.admin.controller;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroupCommand;
import org.haedal.zzansuni.domain.challengegroup.DayType;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroupCommand;
import org.haedal.zzansuni.challengegroup.domain.DayType;

import java.time.LocalDate;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.haedal.zzansuni.controller.auth;
package org.haedal.zzansuni.auth.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.core.api.ApiResponse;
import org.haedal.zzansuni.domain.auth.AuthService;
import org.haedal.zzansuni.domain.user.UserModel;
import org.haedal.zzansuni.auth.domain.AuthService;
import org.haedal.zzansuni.user.domain.UserModel;
import org.haedal.zzansuni.global.jwt.JwtToken;
import org.springframework.data.util.Pair;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.haedal.zzansuni.controller.auth;
package org.haedal.zzansuni.auth.controller;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import org.haedal.zzansuni.domain.auth.OAuth2Provider;
import org.haedal.zzansuni.domain.user.UserCommand;
import org.haedal.zzansuni.auth.domain.OAuth2Provider;
import org.haedal.zzansuni.user.domain.UserCommand;

public class AuthReq {
public record OAuth2LoginRequest(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.haedal.zzansuni.controller.auth;
package org.haedal.zzansuni.auth.controller;

import lombok.Builder;
import org.haedal.zzansuni.controller.user.UserRes;
import org.haedal.zzansuni.domain.user.UserModel;
import org.haedal.zzansuni.user.controller.UserRes;
import org.haedal.zzansuni.user.domain.UserModel;
import org.haedal.zzansuni.global.jwt.JwtToken;

public class AuthRes {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.haedal.zzansuni.domain.auth;
package org.haedal.zzansuni.auth.domain;

import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.domain.user.*;
import org.haedal.zzansuni.global.jwt.JwtToken;
import org.haedal.zzansuni.global.jwt.JwtUser;
import org.haedal.zzansuni.global.jwt.JwtUtils;
import org.haedal.zzansuni.user.domain.*;
import org.springframework.data.util.Pair;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.auth;
package org.haedal.zzansuni.auth.domain;

import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.auth;
package org.haedal.zzansuni.auth.domain;

public enum OAuth2Provider {
KAKAO,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.haedal.zzansuni.domain.auth;
package org.haedal.zzansuni.auth.domain;

import lombok.Builder;
import org.haedal.zzansuni.domain.user.UserCommand;
import org.haedal.zzansuni.user.domain.UserCommand;

@Builder
public record OAuthUserInfoModel(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

import org.haedal.zzansuni.domain.auth.OAuth2Provider;
import org.haedal.zzansuni.auth.domain.OAuth2Provider;
import org.springframework.stereotype.Component;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

import org.haedal.zzansuni.domain.auth.OAuth2Client;
import org.haedal.zzansuni.domain.auth.OAuth2Provider;
import org.haedal.zzansuni.domain.auth.OAuthUserInfoModel;
import org.haedal.zzansuni.auth.domain.OAuth2Client;
import org.haedal.zzansuni.auth.domain.OAuth2Provider;
import org.haedal.zzansuni.auth.domain.OAuthUserInfoModel;
import org.haedal.zzansuni.global.exception.ExternalServerConnectionException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;


import org.haedal.zzansuni.domain.auth.OAuth2Client;
import org.haedal.zzansuni.domain.auth.OAuth2Provider;
import org.haedal.zzansuni.domain.auth.OAuthUserInfoModel;
import org.haedal.zzansuni.auth.domain.OAuth2Client;
import org.haedal.zzansuni.auth.domain.OAuth2Provider;
import org.haedal.zzansuni.auth.domain.OAuthUserInfoModel;
import org.haedal.zzansuni.global.exception.ExternalServerConnectionException;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

import com.fasterxml.jackson.annotation.JsonProperty;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.infrastructure.auth;
package org.haedal.zzansuni.auth.infrastructure;

public record NaverUserInfoResponse(
String resultcode,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.haedal.zzansuni.controller.challengegroup;
package org.haedal.zzansuni.challengegroup.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.controller.PagingRequest;
import org.haedal.zzansuni.controller.PagingResponse;
import org.haedal.zzansuni.common.controller.PagingRequest;
import org.haedal.zzansuni.common.controller.PagingResponse;
import org.haedal.zzansuni.core.api.ApiResponse;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeGroupModel;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeGroupQueryService;
import org.haedal.zzansuni.domain.userchallenge.application.ChallengeRankingService;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.application.ChallengeGroupModel;
import org.haedal.zzansuni.challengegroup.domain.application.ChallengeGroupQueryService;
import org.haedal.zzansuni.userchallenge.domain.application.ChallengeRankingService;
import org.haedal.zzansuni.global.jwt.JwtUser;
import org.springframework.security.core.annotation.AuthenticationPrincipal;
import org.springframework.web.bind.annotation.GetMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.haedal.zzansuni.challengegroup.controller;

public class ChallengeGroupReq {

}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.haedal.zzansuni.controller.challengegroup;
package org.haedal.zzansuni.challengegroup.controller;

import lombok.Builder;
import org.haedal.zzansuni.controller.user.UserRes;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeGroupModel;
import org.haedal.zzansuni.domain.challengegroup.DayType;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeModel;
import org.haedal.zzansuni.domain.userchallenge.application.ChallengeGroupRankingModel;
import org.haedal.zzansuni.user.controller.UserRes;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.application.ChallengeGroupModel;
import org.haedal.zzansuni.challengegroup.domain.DayType;
import org.haedal.zzansuni.challengegroup.domain.application.ChallengeModel;
import org.haedal.zzansuni.userchallenge.domain.application.ChallengeGroupRankingModel;
import org.springframework.data.domain.Page;

import java.time.LocalDate;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import jakarta.persistence.*;

Expand All @@ -8,7 +8,7 @@
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.haedal.zzansuni.domain.BaseTimeEntity;
import org.haedal.zzansuni.common.domain.BaseTimeEntity;

@Entity
@AllArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import lombok.RequiredArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.haedal.zzansuni.domain.BaseTimeEntity;
import org.haedal.zzansuni.common.domain.BaseTimeEntity;

import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Builder;
import lombok.Getter;
import org.haedal.zzansuni.core.utils.SelfValidating;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.DayType;

import java.time.LocalDate;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.haedal.zzansuni.domain.BaseTimeEntity;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroup;
import org.haedal.zzansuni.common.domain.BaseTimeEntity;

@Entity
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.haedal.zzansuni.domain.challengegroup;
package org.haedal.zzansuni.challengegroup.domain;

public enum DayType {
DAY, WEEK, MONTH, YEAR
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.haedal.zzansuni.domain.challengegroup.application;
package org.haedal.zzansuni.challengegroup.domain.application;

import lombok.Builder;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroup;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroupImage;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroup;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroupImage;

import java.time.LocalDate;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.haedal.zzansuni.domain.challengegroup.application;
package org.haedal.zzansuni.challengegroup.domain.application;

import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroup;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroupImage;
import org.haedal.zzansuni.domain.challengegroup.port.ChallengeGroupImageReader;
import org.haedal.zzansuni.domain.challengegroup.port.ChallengeGroupReader;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroup;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroupImage;
import org.haedal.zzansuni.challengegroup.domain.port.ChallengeGroupImageReader;
import org.haedal.zzansuni.challengegroup.domain.port.ChallengeGroupReader;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package org.haedal.zzansuni.domain.challengegroup.application;
package org.haedal.zzansuni.challengegroup.domain.application;

import lombok.RequiredArgsConstructor;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroup;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroupCommand;
import org.haedal.zzansuni.domain.challengegroup.port.ChallengeGroupReader;
import org.haedal.zzansuni.domain.challengegroup.port.ChallengeGroupStore;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroup;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroupCommand;
import org.haedal.zzansuni.challengegroup.domain.port.ChallengeGroupReader;
import org.haedal.zzansuni.challengegroup.domain.port.ChallengeGroupStore;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.haedal.zzansuni.domain.challengegroup.application;
package org.haedal.zzansuni.challengegroup.domain.application;

import lombok.Builder;
import lombok.Getter;
import org.haedal.zzansuni.domain.challengegroup.Challenge;
import org.haedal.zzansuni.domain.challengegroup.DayType;
import org.haedal.zzansuni.challengegroup.domain.Challenge;
import org.haedal.zzansuni.challengegroup.domain.DayType;

import java.time.LocalDate;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.haedal.zzansuni.domain.challengegroup.port;
package org.haedal.zzansuni.challengegroup.domain.port;

import org.haedal.zzansuni.domain.challengegroup.ChallengeGroupImage;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroupImage;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.haedal.zzansuni.domain.challengegroup.port;
package org.haedal.zzansuni.challengegroup.domain.port;

import org.haedal.zzansuni.domain.challengegroup.ChallengeCategory;
import org.haedal.zzansuni.domain.challengegroup.ChallengeGroup;
import org.haedal.zzansuni.domain.challengegroup.application.ChallengeGroupModel;
import org.haedal.zzansuni.domain.userchallenge.application.ChallengeGroupRankingModel;
import org.haedal.zzansuni.challengegroup.domain.ChallengeCategory;
import org.haedal.zzansuni.challengegroup.domain.ChallengeGroup;
import org.haedal.zzansuni.userchallenge.domain.application.ChallengeGroupRankingModel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

Expand Down
Loading

0 comments on commit 06a4e9c

Please sign in to comment.