Skip to content

Commit

Permalink
refactored package structures #4
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingadinga committed Aug 27, 2022
1 parent 54eb6c3 commit f4ad508
Show file tree
Hide file tree
Showing 28 changed files with 67 additions and 34 deletions.
3 changes: 1 addition & 2 deletions src/main/java/com/team20/t4/member/domain/Member.java
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.team20.t4.member.domain;

import com.team20.t4.common.entity.BaseTimeEntity;
import com.team20.t4.plan.RegisterHistory;
import com.team20.t4.post.Post;
import com.team20.t4.post.domain.Post;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/team20/t4/plan/PlanController.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package com.team20.t4.plan;

import com.team20.t4.plan.domain.Progress;
import com.team20.t4.plan.domain.State;
import com.team20.t4.plan.dto.AppointmentPost;
import com.team20.t4.plan.dto.AppointmentTimeVO;
import com.team20.t4.plan.dto.PlanUpdateRequestDto;
import com.team20.t4.plan.dto.RegisterHistorySaveRequestDto;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/team20/t4/plan/PlanService.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import com.team20.t4.common.exception.RequestException;
import com.team20.t4.member.domain.Member;
import com.team20.t4.member.domain.MemberRepository;
import com.team20.t4.plan.domain.*;
import com.team20.t4.plan.dto.*;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import lombok.AllArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import javax.persistence.Embeddable;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import com.team20.t4.member.domain.Member;
import com.team20.t4.post.Post;
import com.team20.t4.post.domain.Post;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;


import com.team20.t4.plan.domain.Plan;
import org.springframework.data.jpa.repository.JpaRepository;

public interface PlanRepository extends JpaRepository<Plan, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import lombok.AllArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import com.team20.t4.common.entity.BaseTimeEntity;
import com.team20.t4.member.domain.Member;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.RegisterHistory;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
Expand All @@ -9,6 +10,6 @@

public interface RegisterHistoryRepository extends JpaRepository<RegisterHistory, Long> {

@Query("SELECT h FROM RegisterHistory h where h.applicant = :applicant and h.state = com.team20.t4.plan.State.PERMITTED")
@Query("SELECT h FROM RegisterHistory h where h.applicant = :applicant and h.state = com.team20.t4.plan.domain.State.PERMITTED")
List<RegisterHistory> readRegisterHistoriesByMember(@Param("applicant") Member applicant);
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.team20.t4.plan.domain.RegisterHistory;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;

@AllArgsConstructor
public class AppointmentPost {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;


import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.FoodType;
import com.team20.t4.plan.domain.Location;
import com.team20.t4.plan.domain.Plan;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.FoodType;
import com.team20.t4.plan.domain.Location;
import com.team20.t4.plan.domain.Plan;
import com.team20.t4.plan.domain.Progress;
import lombok.Builder;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.FoodType;
import com.team20.t4.plan.domain.Location;
import com.team20.t4.plan.domain.Plan;
import com.team20.t4.plan.domain.Progress;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

public class RegisterHistoryResponseDto {
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.Plan;
import lombok.AllArgsConstructor;
import lombok.Getter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.team20.t4.plan;
package com.team20.t4.plan.dto;

import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.domain.Plan;
import com.team20.t4.plan.domain.RegisterHistory;
import com.team20.t4.plan.domain.State;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/team20/t4/post/PostController.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.team20.t4.post;

import com.team20.t4.common.responseFormat.OnlyResponseString;
import com.team20.t4.post.dto.PostResponseDto;
import com.team20.t4.post.dto.PostSaveRequestDto;
import com.team20.t4.post.dto.PostUpdateRequestDto;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/team20/t4/post/PostService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
import com.team20.t4.common.exception.RequestErrorCode;
import com.team20.t4.common.exception.RequestException;
import com.team20.t4.member.MemberService;
import com.team20.t4.post.domain.Post;
import com.team20.t4.post.domain.PostRepository;
import com.team20.t4.post.dto.PostResponseDto;
import com.team20.t4.post.dto.PostSaveRequestDto;
import com.team20.t4.post.dto.PostSaveRequestVo;
import com.team20.t4.post.dto.PostUpdateRequestDto;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
package com.team20.t4.post;
package com.team20.t4.post.domain;

import com.team20.t4.common.entity.BaseTimeEntity;
import com.team20.t4.member.domain.Member;
import com.team20.t4.plan.Plan;
import com.team20.t4.plan.domain.Plan;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.hibernate.engine.internal.Cascade;

import javax.persistence.*;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.team20.t4.post;
package com.team20.t4.post.domain;

import com.team20.t4.post.domain.Post;
import org.springframework.data.jpa.repository.JpaRepository;

public interface PostRepository extends JpaRepository<Post, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.team20.t4.post;
package com.team20.t4.post.dto;

import com.team20.t4.post.domain.Post;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.team20.t4.post;
package com.team20.t4.post.dto;

import com.team20.t4.plan.PlanSaveRequestDto;
import com.team20.t4.plan.dto.PlanSaveRequestDto;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.team20.t4.post;
package com.team20.t4.post.dto;

import com.team20.t4.member.domain.Member;
import com.team20.t4.post.domain.Post;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.team20.t4.post;
package com.team20.t4.post.dto;

import com.team20.t4.post.domain.Post;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down

0 comments on commit f4ad508

Please sign in to comment.