Skip to content

Commit

Permalink
chore: todo 도메인 -> trip 도메인 패키지 병합 (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunwoongH committed Jan 9, 2024
1 parent c0f93f9 commit 3c00a9c
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package org.doorip.todo.api;
package org.doorip.trip.api;

import lombok.RequiredArgsConstructor;
import org.doorip.common.ApiResponse;
import org.doorip.common.ApiResponseUtil;
import org.doorip.message.SuccessMessage;
import org.doorip.todo.dto.request.TodoCreateRequest;
import org.doorip.todo.service.TodoService;
import org.doorip.trip.dto.request.TodoCreateRequest;
import org.doorip.trip.service.TodoService;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.doorip.todo.dto.request;
package org.doorip.trip.dto.request;

import com.fasterxml.jackson.annotation.JsonFormat;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
package org.doorip.todo.service;
package org.doorip.trip.service;

import lombok.RequiredArgsConstructor;
import org.doorip.exception.EntityNotFoundException;
import org.doorip.exception.InvalidValueException;
import org.doorip.message.ErrorMessage;
import org.doorip.todo.domain.Secret;
import org.doorip.todo.domain.Todo;
import org.doorip.todo.dto.request.TodoCreateRequest;
import org.doorip.todo.repository.TodoRepository;
import org.doorip.trip.domain.Participant;
import org.doorip.trip.domain.Secret;
import org.doorip.trip.domain.Todo;
import org.doorip.trip.domain.Trip;
import org.doorip.trip.dto.request.TodoCreateRequest;
import org.doorip.trip.repository.ParticipantRepository;
import org.doorip.trip.repository.TodoRepository;
import org.doorip.trip.repository.TripRepository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

import static org.doorip.todo.domain.Allocator.createAllocator;
import static org.doorip.trip.domain.Allocator.createAllocator;

@RequiredArgsConstructor
@Transactional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.doorip.todo.domain;
package org.doorip.trip.domain;

import jakarta.persistence.*;
import lombok.*;
import org.doorip.common.BaseTimeEntity;
import org.doorip.trip.domain.Participant;

@NoArgsConstructor(access = AccessLevel.PROTECTED)
@AllArgsConstructor(access = AccessLevel.PRIVATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import jakarta.persistence.*;
import lombok.*;
import org.doorip.common.BaseTimeEntity;
import org.doorip.todo.domain.Allocator;
import org.doorip.user.domain.User;

import java.util.ArrayList;
Expand Down Expand Up @@ -42,7 +41,7 @@ public class Participant extends BaseTimeEntity {
@OneToMany(mappedBy = "participant", fetch = FetchType.LAZY, cascade = CascadeType.REMOVE)
private List<Allocator> allocators = new ArrayList<>();

public static Participant createParticipant(Role role, int styleA, int styleB, int styleC, int styleD, int styleE, User user, Trip trip){
public static Participant createParticipant(Role role, int styleA, int styleB, int styleC, int styleD, int styleE, User user, Trip trip) {
Participant participant = Participant.builder()
.role(role)
.styleA(styleA)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.doorip.todo.domain;
package org.doorip.trip.domain;

public enum Progress {
INCOMPLETE, COMPLETE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.doorip.todo.domain;
package org.doorip.trip.domain;

public enum Secret {
OUR, MY;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.doorip.todo.domain;
package org.doorip.trip.domain;

import jakarta.persistence.*;
import lombok.*;
import org.doorip.common.BaseTimeEntity;
import org.doorip.trip.domain.Trip;

import java.time.LocalDate;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import jakarta.persistence.*;
import lombok.*;
import org.doorip.common.BaseTimeEntity;
import org.doorip.todo.domain.Todo;

import java.time.LocalDate;
import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.doorip.todo.repository;
package org.doorip.trip.repository;

import org.doorip.todo.domain.Todo;
import org.doorip.trip.domain.Todo;
import org.springframework.data.jpa.repository.JpaRepository;

public interface TodoRepository extends JpaRepository<Todo, Long> {
Expand Down

0 comments on commit 3c00a9c

Please sign in to comment.