Skip to content

Commit

Permalink
Merge pull request #175 from KUIT-Space/refactor/#174/v1-디렉토리-정리
Browse files Browse the repository at this point in the history
Refactor/#174: v1 디렉토리 정리
  • Loading branch information
hyunn522 authored Jan 16, 2025
2 parents 8e59e7b + d3a2628 commit 1d63d86
Show file tree
Hide file tree
Showing 158 changed files with 516 additions and 552 deletions.
11 changes: 0 additions & 11 deletions src/main/java/space/space_spring/dao/PostLikeDao.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
import org.springframework.web.bind.annotation.RestController;
import space.space_spring.domain.authorization.auth.service.AuthService;
import space.space_spring.domain.user.model.PostLoginDto;
import space.space_spring.exception.CustomException;
import space.space_spring.response.BaseResponse;
import space.space_spring.global.exception.CustomException;
import space.space_spring.global.common.response.BaseResponse;

import static space.space_spring.response.status.BaseExceptionResponseStatus.INVALID_USER_LOGIN;
import static space.space_spring.util.bindingResult.BindingResultUtils.getErrorMessage;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.INVALID_USER_LOGIN;
import static space.space_spring.global.util.bindingResult.BindingResultUtils.getErrorMessage;

@RestController
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import space.space_spring.domain.user.model.PostLoginDto;
import space.space_spring.domain.authorization.jwt.model.entity.RefreshTokenStorage;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.exception.CustomException;
import space.space_spring.global.exception.CustomException;
import space.space_spring.domain.authorization.jwt.model.JwtLoginProvider;
import space.space_spring.util.user.UserUtils;
import space.space_spring.global.util.user.UserUtils;

import static space.space_spring.entity.enumStatus.UserSignupType.LOCAL;
import static space.space_spring.response.status.BaseExceptionResponseStatus.PASSWORD_NO_MATCH;
import static space.space_spring.global.common.enumStatus.UserSignupType.LOCAL;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.PASSWORD_NO_MATCH;

@Service
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import org.springframework.web.bind.annotation.RestController;
import space.space_spring.domain.authorization.jwt.service.JwtService;
import space.space_spring.domain.authorization.jwt.model.TokenPairDTO;
import space.space_spring.response.BaseResponse;
import space.space_spring.global.common.response.BaseResponse;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import space.space_spring.exception.CustomException;
import space.space_spring.exception.jwt.bad_request.JwtUnsupportedTokenException;
import space.space_spring.exception.jwt.unauthorized.JwtInvalidTokenException;
import space.space_spring.exception.jwt.unauthorized.JwtMalformedTokenException;
import space.space_spring.global.exception.CustomException;
import space.space_spring.global.exception.jwt.bad_request.JwtUnsupportedTokenException;
import space.space_spring.global.exception.jwt.unauthorized.JwtInvalidTokenException;
import space.space_spring.global.exception.jwt.unauthorized.JwtMalformedTokenException;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.*;

import java.util.Date;

import static space.space_spring.response.status.BaseExceptionResponseStatus.*;

@Slf4j
@Component
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import lombok.NoArgsConstructor;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Component;
import space.space_spring.exception.jwt.bad_request.JwtNoTokenException;
import space.space_spring.exception.jwt.bad_request.JwtUnsupportedTokenException;
import space.space_spring.global.exception.jwt.bad_request.JwtNoTokenException;
import space.space_spring.global.exception.jwt.bad_request.JwtUnsupportedTokenException;

import static space.space_spring.response.status.BaseExceptionResponseStatus.TOKEN_NOT_FOUND;
import static space.space_spring.response.status.BaseExceptionResponseStatus.UNSUPPORTED_TOKEN_TYPE;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.TOKEN_NOT_FOUND;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.UNSUPPORTED_TOKEN_TYPE;

@Component
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@
import space.space_spring.domain.user.repository.UserRepository;
import space.space_spring.domain.authorization.jwt.model.entity.RefreshTokenStorage;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.exception.CustomException;
import space.space_spring.exception.jwt.unauthorized.JwtExpiredTokenException;
import space.space_spring.exception.jwt.unauthorized.JwtUnauthorizedTokenException;

import static space.space_spring.response.status.BaseExceptionResponseStatus.*;
import space.space_spring.global.exception.CustomException;
import space.space_spring.global.exception.jwt.unauthorized.JwtExpiredTokenException;
import space.space_spring.global.exception.jwt.unauthorized.JwtUnauthorizedTokenException;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.*;

@Service
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.space_spring.domain.authorization.OAuth.controller;
package space.space_spring.domain.authorization.oauth.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import jakarta.servlet.http.HttpServletResponse;
Expand All @@ -8,9 +8,9 @@
import org.springframework.web.bind.annotation.*;
import space.space_spring.domain.authorization.jwt.service.JwtService;
import space.space_spring.domain.authorization.jwt.model.TokenPairDTO;
import space.space_spring.dto.oAuth.KakaoInfo;
import space.space_spring.domain.authorization.oauth.dto.KakaoInfo;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.domain.authorization.OAuth.service.OAuthService;
import space.space_spring.domain.authorization.oauth.service.OAuthService;

import java.io.IOException;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.space_spring.dto.oAuth;
package space.space_spring.domain.authorization.oauth.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.space_spring.domain.authorization.OAuth.service;
package space.space_spring.domain.authorization.oauth.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonNode;
Expand All @@ -14,11 +14,11 @@
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import space.space_spring.domain.user.repository.UserDao;
import space.space_spring.dto.oAuth.KakaoInfo;
import space.space_spring.domain.authorization.oauth.dto.KakaoInfo;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.util.user.UserUtils;
import space.space_spring.global.util.user.UserUtils;

import static space.space_spring.entity.enumStatus.UserSignupType.KAKAO;
import static space.space_spring.global.common.enumStatus.UserSignupType.KAKAO;

@Service
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package space.space_spring.controller;
package space.space_spring.domain.board.controller;

import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import space.space_spring.argumentResolver.jwtLogin.JwtLoginAuth;
import space.space_spring.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.dto.comment.request.CreateCommentRequest;
import space.space_spring.dto.comment.response.ReadCommentsResponse;
import space.space_spring.response.BaseResponse;
import space.space_spring.service.CommentService;
import space.space_spring.global.argumentResolver.jwtLogin.JwtLoginAuth;
import space.space_spring.global.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.domain.board.model.request.CreateCommentRequest;
import space.space_spring.domain.board.model.response.ReadCommentsResponse;
import space.space_spring.global.common.response.BaseResponse;
import space.space_spring.domain.board.service.CommentService;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package space.space_spring.controller;
package space.space_spring.domain.board.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import space.space_spring.argumentResolver.jwtLogin.JwtLoginAuth;
import space.space_spring.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.response.BaseResponse;
import space.space_spring.service.LikeService;
import space.space_spring.global.argumentResolver.jwtLogin.JwtLoginAuth;
import space.space_spring.global.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.global.common.response.BaseResponse;
import space.space_spring.domain.board.service.LikeService;

@RestController
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
package space.space_spring.controller;
package space.space_spring.domain.board.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import space.space_spring.argumentResolver.jwtLogin.JwtLoginAuth;
import space.space_spring.global.argumentResolver.jwtLogin.JwtLoginAuth;

import space.space_spring.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.dto.post.request.CreatePostRequest;
import space.space_spring.dto.post.response.ReadPostDetailResponse;
import space.space_spring.dto.post.response.ReadPostsResponse;
import space.space_spring.global.argumentResolver.userSpace.CheckUserSpace;
import space.space_spring.domain.board.model.request.CreatePostRequest;
import space.space_spring.domain.board.model.response.ReadPostDetailResponse;
import space.space_spring.domain.board.model.response.ReadPostsResponse;

import space.space_spring.domain.userSpace.model.entity.UserSpace;
import space.space_spring.exception.CustomException;
import space.space_spring.response.BaseResponse;
import space.space_spring.service.PostService;
import space.space_spring.util.userSpace.UserSpaceUtils;
import space.space_spring.global.exception.CustomException;
import space.space_spring.global.common.response.BaseResponse;
import space.space_spring.domain.board.service.PostService;
import space.space_spring.global.util.userSpace.UserSpaceUtils;
import java.util.List;
import java.util.Optional;

import static space.space_spring.response.status.BaseExceptionResponseStatus.INVALID_POST_CREATE;
import static space.space_spring.global.common.response.status.BaseExceptionResponseStatus.INVALID_POST_CREATE;

@RestController
@RequiredArgsConstructor
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package space.space_spring.entity;
package space.space_spring.domain.board.model.entity;

import jakarta.persistence.*;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.global.common.entity.BaseEntity;

@Entity
@Table(name = "Post_Comment")
@Getter
@NoArgsConstructor
public class Comment extends BaseEntity{
public class Comment extends BaseEntity {
@Id
@GeneratedValue
@Column(name = "comment_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package space.space_spring.entity;
package space.space_spring.domain.board.model.entity;

import jakarta.persistence.*;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.global.common.entity.BaseEntity;

@Entity
@Table(name = "Comment_Like",
uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "post_comment_id"})})
@Getter
@NoArgsConstructor
public class CommentLike extends BaseEntity{
public class CommentLike extends BaseEntity {
@Id
@GeneratedValue
@Column(name = "comment_like_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package space.space_spring.entity;
package space.space_spring.domain.board.model.entity;

import jakarta.persistence.*;
import lombok.Builder;
Expand All @@ -8,6 +8,7 @@
import space.space_spring.domain.user.model.entity.User;

import java.util.List;
import space.space_spring.global.common.entity.BaseEntity;

@Entity
@Table(name = "Posts")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package space.space_spring.entity;
package space.space_spring.domain.board.model.entity;

import jakarta.persistence.*;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import space.space_spring.global.common.entity.BaseEntity;

@Entity
@Table(name = "Post_Image")
@Getter
@NoArgsConstructor
public class PostImage extends BaseEntity{
public class PostImage extends BaseEntity {
@Id
@GeneratedValue
@Column(name = "post_image_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
package space.space_spring.entity;
package space.space_spring.domain.board.model.entity;

import jakarta.persistence.*;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import space.space_spring.domain.user.model.entity.User;
import space.space_spring.global.common.entity.BaseEntity;

@Entity
@Table(name = "Post_Like")
@Getter
@NoArgsConstructor
public class PostLike extends BaseEntity{
public class PostLike extends BaseEntity {
@Id
@GeneratedValue
@Column(name = "post_like_id")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package space.space_spring.dto.comment.request;
package space.space_spring.domain.board.model.request;

import jakarta.validation.constraints.NotBlank;
import lombok.*;
import space.space_spring.entity.Comment;
import space.space_spring.entity.Post;
import space.space_spring.domain.board.model.entity.Comment;
import space.space_spring.domain.board.model.entity.Post;
import space.space_spring.domain.user.model.entity.User;


Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package space.space_spring.dto.post.request;
package space.space_spring.domain.board.model.request;

import jakarta.validation.constraints.NotBlank;
import lombok.*;
import org.springframework.web.multipart.MultipartFile;
import space.space_spring.entity.Post;
import space.space_spring.entity.PostImage;
import space.space_spring.domain.board.model.entity.Post;
import space.space_spring.domain.board.model.entity.PostImage;
import space.space_spring.domain.space.model.entity.Space;
import space.space_spring.domain.user.model.entity.User;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package space.space_spring.dto.comment.response;
package space.space_spring.domain.board.model.response;

import lombok.*;
import space.space_spring.entity.Comment;
import space.space_spring.domain.board.model.entity.Comment;
import space.space_spring.domain.userSpace.model.entity.UserSpace;
import space.space_spring.util.post.ConvertCreatedDate;
import space.space_spring.global.util.post.ConvertCreatedDate;

@Builder
@Getter
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package space.space_spring.dto.post.response;
package space.space_spring.domain.board.model.response;

import lombok.*;
import space.space_spring.dto.comment.response.ReadCommentsResponse;
import space.space_spring.entity.Post;
import space.space_spring.entity.PostImage;
import space.space_spring.domain.board.model.entity.Post;
import space.space_spring.domain.board.model.entity.PostImage;
import space.space_spring.domain.userSpace.model.entity.UserSpace;
import space.space_spring.util.post.ConvertCreatedDate;
import space.space_spring.global.util.post.ConvertCreatedDate;

import java.util.List;

Expand Down
Loading

0 comments on commit 1d63d86

Please sign in to comment.