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

refactor: 공통으로 사용하는 도메인 모델을 common 패키지로 추출 #74

Merged
merged 1 commit into from
Jul 11, 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 @@ -3,6 +3,7 @@
import es.princip.getp.domain.member.domain.Member;
import es.princip.getp.domain.member.domain.MemberType;
import es.princip.getp.domain.serviceTerm.dto.response.ServiceTermAgreementResponse;

import java.util.List;

public record SignUpResponse(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package es.princip.getp.domain.client.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.client.dto.request.CreateClientRequest;
import es.princip.getp.domain.client.dto.request.UpdateClientRequest;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.member.domain.Member;
import es.princip.getp.domain.people.domain.PeopleLike;
import jakarta.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package es.princip.getp.domain.base;
package es.princip.getp.domain.common.domain;

import jakarta.persistence.Column;
import jakarta.persistence.EntityListeners;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package es.princip.getp.domain.hashtag.domain;
package es.princip.getp.domain.common.domain;

import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.member.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.member.dto.request.CreateMemberRequest;
import es.princip.getp.domain.member.dto.request.UpdateMemberRequest;
import es.princip.getp.domain.serviceTerm.domain.ServiceTermAgreement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.member.domain.Member;
import es.princip.getp.domain.people.dto.request.CreatePeopleRequest;
import es.princip.getp.domain.people.dto.request.UpdatePeopleRequest;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.common.domain.Hashtag;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.client.domain.Client;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.dto.request.UpdatePeopleProfileRequest;
import es.princip.getp.domain.project.domain.TechStack;
import jakarta.persistence.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.project.domain.TechStack;
import jakarta.persistence.*;
import lombok.AccessLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.request;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.Education;
import es.princip.getp.domain.people.domain.People;
import es.princip.getp.domain.people.domain.PeopleProfile;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.request;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.Education;
import es.princip.getp.domain.people.domain.Portfolio;
import es.princip.getp.domain.project.domain.TechStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.response.peopleProfile;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;

import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.response.peopleProfile;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.Education;
import es.princip.getp.domain.people.domain.PeopleProfile;
import es.princip.getp.domain.people.domain.Portfolio;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.response.peopleProfile;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.Education;
import es.princip.getp.domain.people.domain.PeopleProfile;
import es.princip.getp.domain.project.domain.TechStack;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.dto.response.peopleProfile;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.PeopleProfile;
import lombok.Builder;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.querydsl.core.Tuple;
import com.querydsl.core.types.OrderSpecifier;
import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.People;
import es.princip.getp.domain.people.domain.PeopleHashtag;
import es.princip.getp.domain.people.domain.PeopleOrder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import es.princip.getp.infra.exception.BusinessLogicException;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.time.LocalDate;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@Embeddable
@Getter
@EqualsAndHashCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import es.princip.getp.infra.exception.BusinessLogicException;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.time.LocalDate;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@Embeddable
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
import es.princip.getp.infra.exception.BusinessLogicException;
import jakarta.persistence.Column;
import jakarta.persistence.Embeddable;
import java.time.LocalDate;
import lombok.AccessLevel;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;

@Embeddable
@Getter
@NoArgsConstructor(access = AccessLevel.PROTECTED)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package es.princip.getp.domain.project.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.client.domain.Client;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
package es.princip.getp.domain.project.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.people.domain.People;
import jakarta.persistence.CascadeType;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.EnumType;
import jakarta.persistence.Enumerated;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.OneToMany;
import jakarta.persistence.Table;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.time.LocalDate;
import java.util.ArrayList;
import java.util.List;

@Entity
@Getter
@Table(name = "project_application")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
package es.princip.getp.domain.project.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
package es.princip.getp.domain.project.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import jakarta.persistence.Column;
import jakarta.persistence.Embedded;
import jakarta.persistence.Entity;
import jakarta.persistence.FetchType;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import jakarta.persistence.JoinColumn;
import jakarta.persistence.ManyToOne;
import jakarta.persistence.Table;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package es.princip.getp.domain.project.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.common.domain.Hashtag;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import es.princip.getp.domain.project.domain.Project;
import es.princip.getp.domain.project.domain.ProjectApplication;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import es.princip.getp.domain.project.domain.ProjectApplication;
import es.princip.getp.domain.project.domain.ProjectApplicationAttachmentFile;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import es.princip.getp.domain.project.domain.Project;
import es.princip.getp.domain.project.domain.ProjectHashtag;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package es.princip.getp.domain.project.dto.response;

import es.princip.getp.domain.project.domain.MeetingType;
import es.princip.getp.domain.project.domain.Project;
import es.princip.getp.domain.project.domain.ProjectAttachmentFile;
import es.princip.getp.domain.project.domain.ProjectHashtag;
import es.princip.getp.domain.project.domain.MeetingType;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package es.princip.getp.domain.project.dto.response;

import es.princip.getp.domain.client.dto.response.ProjectClientResponse;
import es.princip.getp.domain.project.domain.MeetingType;
import es.princip.getp.domain.project.domain.Project;
import es.princip.getp.domain.project.domain.ProjectAttachmentFile;
import es.princip.getp.domain.project.domain.ProjectHashtag;
import es.princip.getp.domain.project.domain.MeetingType;
import jakarta.validation.constraints.NotNull;

import java.time.LocalDate;
import java.util.List;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.serviceTerm.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import jakarta.persistence.*;
import lombok.AccessLevel;
import lombok.Builder;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.serviceTerm.domain;

import es.princip.getp.domain.base.BaseTimeEntity;
import es.princip.getp.domain.common.domain.BaseTimeEntity;
import es.princip.getp.domain.member.domain.Member;
import jakarta.persistence.*;
import lombok.AccessLevel;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package es.princip.getp.domain.serviceTerm.exception;

import es.princip.getp.infra.exception.ErrorCode;
import es.princip.getp.infra.exception.ErrorDescription;
import org.springframework.http.HttpStatus;
import es.princip.getp.infra.exception.ErrorCode;

public enum ServiceTermErrorCode implements ErrorCode {
SERVICE_TERM_NOT_FOUND(HttpStatus.NOT_FOUND, "존재하지 않는 서비스 약관");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package es.princip.getp.domain.people.fixture;

import es.princip.getp.domain.hashtag.domain.Hashtag;
import es.princip.getp.domain.common.domain.Hashtag;
import es.princip.getp.domain.people.domain.Education;
import es.princip.getp.domain.people.domain.People;
import es.princip.getp.domain.people.domain.PeopleProfile;
Expand Down