Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] 패키지 구조 변경 #62

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import server.haengdong.application.request.BillActionAppRequest;
import server.haengdong.domain.Action;
import server.haengdong.domain.BillAction;
import server.haengdong.domain.Event;
import server.haengdong.persistence.ActionRepository;
import server.haengdong.persistence.BillActionRepository;
import server.haengdong.persistence.EventRepository;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.action.BillAction;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.action.ActionRepository;
import server.haengdong.domain.action.BillActionRepository;
import server.haengdong.domain.event.EventRepository;

@RequiredArgsConstructor
@Transactional(readOnly = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import org.springframework.stereotype.Service;
import server.haengdong.application.request.EventAppRequest;
import server.haengdong.application.response.EventAppResponse;
import server.haengdong.domain.Event;
import server.haengdong.domain.EventTokenProvider;
import server.haengdong.persistence.EventRepository;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.event.EventTokenProvider;
import server.haengdong.domain.event.EventRepository;

@RequiredArgsConstructor
@Service
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
import org.springframework.stereotype.Component;
import server.haengdong.application.request.MemberActionSaveAppRequest;
import server.haengdong.application.request.MemberActionsSaveAppRequest;
import server.haengdong.domain.Action;
import server.haengdong.domain.MemberAction;
import server.haengdong.domain.MemberActionStatus;
import server.haengdong.domain.MemberGroupIdProvider;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.action.MemberAction;
import server.haengdong.domain.action.MemberActionStatus;
import server.haengdong.domain.action.MemberGroupIdProvider;

@RequiredArgsConstructor
@Component
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import server.haengdong.application.request.MemberActionsSaveAppRequest;
import server.haengdong.domain.Action;
import server.haengdong.domain.Event;
import server.haengdong.domain.MemberAction;
import server.haengdong.persistence.ActionRepository;
import server.haengdong.persistence.EventRepository;
import server.haengdong.persistence.MemberActionRepository;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.action.MemberAction;
import server.haengdong.domain.action.ActionRepository;
import server.haengdong.domain.event.EventRepository;
import server.haengdong.domain.action.MemberActionRepository;

@RequiredArgsConstructor
@Transactional(readOnly = true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package server.haengdong.application.request;

import server.haengdong.domain.Action;
import server.haengdong.domain.BillAction;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.action.BillAction;

public record BillActionAppRequest(
String title,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package server.haengdong.application.request;

import server.haengdong.domain.Event;
import server.haengdong.domain.event.Event;

public record EventAppRequest(String name) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package server.haengdong.application.request;

import server.haengdong.domain.Action;
import server.haengdong.domain.MemberAction;
import server.haengdong.domain.MemberActionStatus;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.action.MemberAction;
import server.haengdong.domain.action.MemberActionStatus;

public record MemberActionSaveAppRequest(String name, String status) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package server.haengdong.application.response;

import server.haengdong.domain.Event;
import server.haengdong.domain.event.Event;

public record EventAppResponse(String token) {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
Expand All @@ -9,6 +9,7 @@
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import server.haengdong.domain.event.Event;

@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package server.haengdong.persistence;
package server.haengdong.domain.action;

import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import server.haengdong.domain.Action;
import server.haengdong.domain.Event;
import server.haengdong.domain.event.Event;

@Repository
public interface ActionRepository extends JpaRepository<Action, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
package server.haengdong.persistence;
package server.haengdong.domain.action;

import java.util.List;
import org.springframework.data.jpa.repository.EntityGraph;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import server.haengdong.domain.BillAction;
import server.haengdong.domain.Event;
import server.haengdong.domain.event.Event;

@Repository
public interface BillActionRepository extends JpaRepository<BillAction, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import jakarta.persistence.CascadeType;
import jakarta.persistence.Entity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
package server.haengdong.persistence;
package server.haengdong.domain.action;

import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import server.haengdong.domain.Event;
import server.haengdong.domain.MemberAction;
import server.haengdong.domain.event.Event;

@Repository
public interface MemberActionRepository extends JpaRepository<MemberAction, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import java.util.Arrays;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import org.springframework.stereotype.Component;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.event;

import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package server.haengdong.persistence;
package server.haengdong.domain.event;

import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import server.haengdong.domain.Event;

@Repository
public interface EventRepository extends JpaRepository<Event, Long> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.event;

import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.event;

import java.util.UUID;
import org.springframework.stereotype.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import server.haengdong.application.request.BillActionAppRequest;
import server.haengdong.domain.BillAction;
import server.haengdong.domain.Event;
import server.haengdong.persistence.BillActionRepository;
import server.haengdong.persistence.EventRepository;
import server.haengdong.domain.action.BillAction;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.action.BillActionRepository;
import server.haengdong.domain.event.EventRepository;

@SpringBootTest
class BillActionServiceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import org.springframework.boot.test.mock.mockito.MockBean;
import server.haengdong.application.request.EventAppRequest;
import server.haengdong.application.response.EventAppResponse;
import server.haengdong.domain.EventTokenProvider;
import server.haengdong.domain.event.EventTokenProvider;

@SpringBootTest
class EventServiceTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
import org.springframework.boot.test.context.SpringBootTest;
import server.haengdong.application.request.MemberActionSaveAppRequest;
import server.haengdong.application.request.MemberActionsSaveAppRequest;
import server.haengdong.domain.Action;
import server.haengdong.domain.Event;
import server.haengdong.domain.MemberAction;
import server.haengdong.domain.MemberActionStatus;
import server.haengdong.persistence.ActionRepository;
import server.haengdong.persistence.EventRepository;
import server.haengdong.persistence.MemberActionRepository;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.action.MemberAction;
import server.haengdong.domain.action.MemberActionStatus;
import server.haengdong.domain.action.ActionRepository;
import server.haengdong.domain.event.EventRepository;
import server.haengdong.domain.action.MemberActionRepository;

@SpringBootTest
class MemberActionFactoryTest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import org.springframework.boot.test.context.SpringBootTest;
import server.haengdong.application.request.MemberActionSaveAppRequest;
import server.haengdong.application.request.MemberActionsSaveAppRequest;
import server.haengdong.domain.Action;
import server.haengdong.domain.Event;
import server.haengdong.domain.MemberAction;
import server.haengdong.domain.MemberActionStatus;
import server.haengdong.persistence.ActionRepository;
import server.haengdong.persistence.EventRepository;
import server.haengdong.persistence.MemberActionRepository;
import server.haengdong.domain.action.Action;
import server.haengdong.domain.event.Event;
import server.haengdong.domain.action.MemberAction;
import server.haengdong.domain.action.MemberActionStatus;
import server.haengdong.domain.action.ActionRepository;
import server.haengdong.domain.event.EventRepository;
import server.haengdong.domain.action.MemberActionRepository;

@SpringBootTest
class MemberActionServiceTest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import static org.assertj.core.api.Assertions.assertThat;

import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import server.haengdong.domain.event.Event;

class ActionTest {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package server.haengdong.domain;
package server.haengdong.domain.action;

import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
Expand All @@ -8,6 +8,7 @@
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import server.haengdong.domain.event.Event;

class BillActionTest {

Expand Down
Loading