From 955beb8843c180ea702ae41d20030e0cf6066bc5 Mon Sep 17 00:00:00 2001 From: goder Date: Tue, 20 Feb 2024 11:37:55 +0900 Subject: [PATCH] =?UTF-8?q?[FEAT]=20V1=EC=97=90=20=EB=8C=80=ED=95=9C=20?= =?UTF-8?q?=EC=97=94=ED=8B=B0=ED=8B=B0=20=EC=9E=AC=EC=84=A4=EA=B3=84=20(#3?= =?UTF-8?q?1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [MOVE] BaseEntity 위치를 global 패키지로 이동 * [RENAME] MeeteamInvite -> InvitedUser * [RENAME] RecruitmentMember -> RecruitmentRole * [DEL] 기획제거된 엔티티 제거 * [ADD] 학교, 학과 Entity 분리 * [MOVE] 스키마 별 패키지 구조변경 * [CHORE] User Entity 필드 수정 - 관심있는 역할 추가 - 기존 Enum Role -> Enum Authority로 변경 * [Rename] Spec -> Skill * [CHORE] 패키지 구조 유지를 위한 dummy.txt 추가 * [DEL] dummy.txt 제거 * [ADD] global enum에 필수정보 추가 * [CHORE] 밋팀, 구인글 필수정보 필드 및 구인글 태그 도메인 추가 * [CHORE] 구인글 스키마 수정 - 명칭 RecruitmentPost로 변경 - 작성자 추가 - 기존에는 created by 로 접근하려 했으나, 작성/수정 모두 작성자에게만 권한이 있기에 변경 - 신청자에 역할, 전할 말 추가 - 북마크 수 추가 - 분야 추가 - 구인 역할에 인원 수 추가 - 마감 여부 추가 (soft delete) * [CHORE] 구인글 밋팀 추가 - 관계 스키마 제거 후, 1:N 매핑 * [FIX] ColumnDefault 정상 동작하도록 변경 - @DynamicInsert 추가 - 클래스 멤버 변수의 default value 제거 * [CHORE] 구인글 댓글 추가 * [RENAME] 패키지명 오타 수정 * [CHORE] 구인글 전할 말 제약 조건 추가 * [CHORE] 평가를 위한 점수 저장 위치 변경 * [CHORE] 제약조건 수정 * [CHORE] InvitedUser BaseTimeEntity로 변경 * [CHORE] 산출물 엔티티 추가 * [CHORE] 포트폴리오 스키마 추가 * [FIX] 학교 테이블 변경으로 인한 버그 수정 * [CHORE] 전화번호 길이제한 15로 변경 --- .../synk/meeteam/domain/auth/api/AuthApi.java | 2 +- .../domain/auth/api/AuthController.java | 24 ++-- .../auth/dto/request/AuthUserRequestDto.java | 2 +- .../dto/request/SignUpUserRequestDto.java | 15 ++- .../dto/response/AuthUserResponseDto.java | 8 +- .../domain/auth/service/AuthService.java | 25 ++-- .../auth/service/AuthServiceProvider.java | 2 +- .../domain/auth/service/vo/UserSignUpVO.java | 12 +- .../{base => common/department}/api/dummy.txt | 0 .../{base => common/department}/dto/dummy.txt | 0 .../common/department/entity/Department.java | 37 ++++++ .../department}/exception/dummy.txt | 0 .../department}/repository/dummy.txt | 0 .../department}/service/dummy.txt | 0 .../{bookmark => common/field}/api/dummy.txt | 0 .../{bookmark => common/field}/dto/dummy.txt | 0 .../{ => common}/field/entity/Field.java | 2 +- .../field}/exception/dummy.txt | 0 .../field}/repository/dummy.txt | 0 .../field}/service/dummy.txt | 0 .../output}/api/dummy.txt | 0 .../output}/dto/dummy.txt | 0 .../domain/common/output/entity/Output.java | 36 ++++++ .../output/exception}/dummy.txt | 0 .../output/repository}/dummy.txt | 0 .../output/service}/dummy.txt | 0 .../output_link/api}/dummy.txt | 0 .../api => common/output_link/dto}/dummy.txt | 0 .../output_link/entity/OutputLink.java} | 33 ++---- .../output_link/exception}/dummy.txt | 0 .../output_link/repository}/dummy.txt | 0 .../output_link/service}/dummy.txt | 0 .../output_slide/api}/dummy.txt | 0 .../api => common/output_slide/dto}/dummy.txt | 0 .../output_slide/entity/OutputSlide.java} | 36 +++--- .../output_slide/exception}/dummy.txt | 0 .../output_slide/repository}/dummy.txt | 0 .../output_slide/service}/dummy.txt | 0 .../service => common/role/api}/dummy.txt | 0 .../api => common/role/dto}/dummy.txt | 0 .../domain/{ => common}/role/entity/Role.java | 2 +- .../dto => common/role/exception}/dummy.txt | 0 .../role/repository}/dummy.txt | 0 .../role/service}/dummy.txt | 0 .../service => common/skill/api}/dummy.txt | 0 .../api => common/skill/dto}/dummy.txt | 0 .../skill/entity/Skill.java} | 6 +- .../dto => common/skill/exception}/dummy.txt | 0 .../skill/repository}/dummy.txt | 0 .../skill/service}/dummy.txt | 0 .../service => common/tag/api}/dummy.txt | 0 .../api => common/tag/dto}/dummy.txt | 0 .../domain/{ => common}/tag/entity/Tag.java | 4 +- .../{ => common}/tag/entity/TagType.java | 2 +- .../dto => common/tag/exception}/dummy.txt | 0 .../tag/repository}/dummy.txt | 0 .../tag/service}/dummy.txt | 0 .../university/api}/dummy.txt | 0 .../api => common/university/dto}/dummy.txt | 0 .../university/entity/University.java | 8 +- .../exception/UniversityException.java | 2 +- .../exception/UniversityExceptionType.java | 2 +- .../repository/UniversityRepository.java | 26 +++++ .../university/service/UniversityService.java | 20 ++++ .../domain/meeteam/entity/MeeteamScope.java | 6 - .../invited_user/api}/dummy.txt | 0 .../invited_user/dto}/dummy.txt | 0 .../invited_user/entity/InvitedUser.java} | 14 +-- .../invited_user/exception}/dummy.txt | 0 .../invited_user/repository}/dummy.txt | 0 .../invited_user/service}/dummy.txt | 0 .../dto => meeteam/meeteam/api}/dummy.txt | 0 .../meeteam/dto}/dummy.txt | 0 .../meeteam/{ => meeteam}/entity/Meeteam.java | 45 +++++--- .../{ => meeteam}/entity/MeeteamStatus.java | 2 +- .../meeteam/entity}/dummy.txt | 0 .../exception/MeeteamException.java | 2 +- .../exception/MeeteamExceptionType.java | 2 +- .../meeteam/repository}/dummy.txt | 0 .../api => meeteam/meeteam/service}/dummy.txt | 0 .../meeteam_comment/api}/dummy.txt | 0 .../meeteam_comment/dto}/dummy.txt | 0 .../entity/MeeteamComment.java | 8 +- .../meeteam_comment/exception}/dummy.txt | 0 .../meeteam_comment/repository}/dummy.txt | 0 .../meeteam_comment/service}/dummy.txt | 0 .../meeteam_issue/api}/dummy.txt | 0 .../meeteam_issue/dto}/dummy.txt | 0 .../meeteam_issue/entity/MeeteamIssue.java | 4 +- .../entity/MeeteamIssueType.java | 2 +- .../meeteam_issue/exception}/dummy.txt | 0 .../meeteam_issue/repository}/dummy.txt | 0 .../meeteam_issue/service}/dummy.txt | 0 .../meeteam_like/api}/dummy.txt | 0 .../meeteam_like/dto}/dummy.txt | 0 .../meeteam_like/entity/MeeteamLike.java | 8 +- .../meeteam_like/exception}/dummy.txt | 0 .../meeteam_like/repository}/dummy.txt | 0 .../meeteam_like/service}/dummy.txt | 0 .../meeteam_link/api}/dummy.txt | 0 .../meeteam_link/dto}/dummy.txt | 0 .../meeteam_link/entity/LinkType.java | 2 +- .../meeteam_link/entity/MeeteamLink.java | 6 +- .../meeteam_link/exception}/dummy.txt | 0 .../meeteam_link/repository}/dummy.txt | 0 .../meeteam_tag}/api/dummy.txt | 0 .../meeteam_tag}/dto/dummy.txt | 0 .../meeteam_tag/entity/MeeteamTag.java | 8 +- .../meeteam_tag/exception}/dummy.txt | 0 .../meeteam_tag}/repository/dummy.txt | 0 .../meeteam_tag}/service/dummy.txt | 0 .../member}/api/dummy.txt | 0 .../member}/dto/dummy.txt | 0 .../{ => meeteam}/member/entity/Member.java | 10 +- .../member}/exception/dummy.txt | 0 .../member}/repository/dummy.txt | 0 .../member}/service/dummy.txt | 0 .../portfolio}/api/dummy.txt | 0 .../portfolio}/dto/dummy.txt | 0 .../portfolio/portfolio/entity/Portfolio.java | 78 +++++++++++++ .../exception/PortfolioException.java | 10 ++ .../exception/PortfolioExceptionType.java} | 4 +- .../portfolio/repository}/dummy.txt | 0 .../portfolio/service}/dummy.txt | 0 .../portfolio_skill/api}/dummy.txt | 0 .../portfolio_skill/dto}/dummy.txt | 0 .../entity/PortfolioSkill.java | 39 +++++++ .../portfolio_skill/exception}/dummy.txt | 0 .../portfolio_skill/repository}/dummy.txt | 0 .../portfolio_skill/service}/dummy.txt | 0 .../bookmark/api}/dummy.txt | 0 .../bookmark/dto}/dummy.txt | 0 .../bookmark/entity/Bookmark.java | 8 +- .../bookmark/exception}/dummy.txt | 0 .../bookmark/repository}/dummy.txt | 0 .../bookmark/service}/dummy.txt | 0 .../exception/RecruitmentException.java | 10 -- .../recruitment_applicant/api}/dummy.txt | 0 .../recruitment_applicant/dto}/dummy.txt | 0 .../entity/RecruitmentApplicant.java | 19 ++- .../exception}/dummy.txt | 0 .../repository}/dummy.txt | 0 .../recruitment_applicant/service}/dummy.txt | 0 .../recruitment_comment/api}/dummy.txt | 0 .../recruitment_comment/dto}/dummy.txt | 0 .../entity/RecruitmentComment.java | 66 +++++++++++ .../recruitment_comment/exception}/dummy.txt | 0 .../recruitment_comment/repository}/dummy.txt | 0 .../recruitment_comment/service}/dummy.txt | 0 .../recruitment_post/api}/dummy.txt | 0 .../recruitment_post/dto}/dummy.txt | 0 .../entity/RecruitmentPost.java | 108 ++++++++++++++++++ .../exception/RecruitmentPostException.java | 10 ++ .../RecruitmentPostExceptionType.java | 18 +++ .../recruitment_post/repository}/dummy.txt | 0 .../recruitment_post/service}/dummy.txt | 0 .../recruitment_role/api}/dummy.txt | 0 .../recruitment_role/dto}/dummy.txt | 0 .../entity/RecruitmentRole.java} | 10 +- .../recruitment_role/exception}/dummy.txt | 0 .../recruitment_role/repository}/dummy.txt | 0 .../recruitment_role/service}/dummy.txt | 0 .../recruitment_role_skill/api}/dummy.txt | 0 .../recruitment_role_skill/dto}/dummy.txt | 0 .../entity/RecruitmentRoleSkill.java} | 23 ++-- .../exception}/dummy.txt | 0 .../repository}/dummy.txt | 0 .../recruitment_role_skill/service}/dummy.txt | 0 .../recruitment_tag/api}/dummy.txt | 0 .../recruitment_tag/dto}/dummy.txt | 0 .../entity/RecruitmentTag.java | 37 ++++++ .../recruitment_tag/exception}/dummy.txt | 0 .../recruitment_tag/repository}/dummy.txt | 0 .../recruitment_tag/service}/dummy.txt | 0 .../entity/RecruitmentMemberSpec.java | 44 ------- .../service => sub/follow/api}/dummy.txt | 0 .../api => sub/follow/dto}/dummy.txt | 0 .../{ => sub}/follow/entity/Follow.java | 6 +- .../dto => sub/follow/exception}/dummy.txt | 0 .../follow/repository}/dummy.txt | 0 .../follow/service}/dummy.txt | 0 .../notification/api}/dummy.txt | 0 .../api => sub/notification/dto}/dummy.txt | 0 .../notification/entity/Notification.java | 4 +- .../notification/entity/NotificationType.java | 2 +- .../notification/exception}/dummy.txt | 0 .../notification/repository}/dummy.txt | 0 .../notification/service}/dummy.txt | 0 .../repository/UniversityRepository.java | 34 ------ .../university/service/UniversityService.java | 34 ------ .../service => user/evaluation/api}/dummy.txt | 0 .../domain/user/evaluation/dto/dummy.txt | 0 .../evaluation/entity/Evaluation.java | 26 ++--- .../exception/EvaluationException.java | 2 +- .../exception/EvaluationExceptionType.java | 2 +- .../user/evaluation/exception/dummy.txt | 0 .../user/evaluation/repository/dummy.txt | 0 .../domain/user/evaluation/service/dummy.txt | 0 .../meeteam/domain/user/user/api/dummy.txt | 0 .../meeteam/domain/user/user/dto/dummy.txt | 0 .../domain/user/{ => user}/entity/User.java | 103 ++++++++++++----- .../domain/user/{ => user}/entity/UserVO.java | 6 +- .../entity/enums/Authority.java} | 4 +- .../{ => user}/entity/enums/PlatformType.java | 2 +- .../{ => user}/exception/UserException.java | 2 +- .../exception/UserExceptionType.java | 2 +- .../{ => user}/repository/UserRepository.java | 6 +- .../user/{ => user}/service/UserService.java | 2 +- .../user/user_interest_tag/api/dummy.txt | 0 .../user/user_interest_tag/dto/dummy.txt | 0 .../entity/UserInterestTag.java | 8 +- .../user_interest_tag/exception/dummy.txt | 0 .../user_interest_tag/repository/dummy.txt | 0 .../user/user_interest_tag/service/dummy.txt | 0 .../domain/user/user_link/api/dummy.txt | 0 .../domain/user/user_link/dto/dummy.txt | 0 .../{ => user}/user_link/entity/UserLink.java | 8 +- .../domain/user/user_link/exception/dummy.txt | 0 .../user/user_link/repository/dummy.txt | 0 .../domain/user/user_link/service/dummy.txt | 0 .../domain/user/user_skill/api/dummy.txt | 0 .../domain/user/user_skill/dto/dummy.txt | 0 .../user_skill/entity/UserSkill.java} | 20 ++-- .../user/user_skill/exception/dummy.txt | 0 .../user/user_skill/repository/dummy.txt | 0 .../domain/user/user_skill/service/dummy.txt | 0 .../base => global}/entity/BaseEntity.java | 2 +- .../entity/BaseTimeEntity.java | 2 +- .../synk/meeteam/global/entity/Category.java | 5 + .../meeteam/global/entity/ProceedType.java | 7 ++ .../synk/meeteam/global/entity/Scope.java | 6 + .../synk/meeteam/infra/mail/MailService.java | 6 +- .../infra/oauth/service/NaverAuthService.java | 12 +- .../redis/repository/RedisUserRepository.java | 2 +- .../synk/meeteam/security/CustomAuthUser.java | 6 +- .../security/jwt/service/JwtService.java | 14 +-- .../jwt/service/JwtTokenProvider.java | 2 +- .../security/service/MemberAuthService.java | 6 +- 238 files changed, 836 insertions(+), 416 deletions(-) rename src/main/java/synk/meeteam/domain/{base => common/department}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{base => common/department}/dto/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/common/department/entity/Department.java rename src/main/java/synk/meeteam/domain/{base => common/department}/exception/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{base => common/department}/repository/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{base => common/department}/service/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{bookmark => common/field}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{bookmark => common/field}/dto/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => common}/field/entity/Field.java (92%) rename src/main/java/synk/meeteam/domain/{bookmark => common/field}/exception/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{bookmark => common/field}/repository/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{bookmark => common/field}/service/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{evaluation => common/output}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{evaluation => common/output}/dto/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/common/output/entity/Output.java rename src/main/java/synk/meeteam/domain/{evaluation/entity => common/output/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{evaluation/exception => common/output/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{evaluation/repository => common/output/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{evaluation/service => common/output_link/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{field/api => common/output_link/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{timetable_block/entity/TimetableBlock.java => common/output_link/entity/OutputLink.java} (55%) rename src/main/java/synk/meeteam/domain/{field/dto => common/output_link/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{field/exception => common/output_link/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{field/repository => common/output_link/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{field/service => common/output_slide/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{follow/api => common/output_slide/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment/entity/Recruitment.java => common/output_slide/entity/OutputSlide.java} (53%) rename src/main/java/synk/meeteam/domain/{follow/dto => common/output_slide/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{follow/exception => common/output_slide/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{follow/repository => common/output_slide/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{follow/service => common/role/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam/api => common/role/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => common}/role/entity/Role.java (92%) rename src/main/java/synk/meeteam/domain/{meeteam/dto => common/role/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam/entity => common/role/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam/repository => common/role/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam/service => common/skill/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_comment/api => common/skill/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{spec/entity/Spec.java => common/skill/entity/Skill.java} (84%) rename src/main/java/synk/meeteam/domain/{meeteam_comment/dto => common/skill/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_comment/exception => common/skill/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_comment/repository => common/skill/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_comment/service => common/tag/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/api => common/tag/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => common}/tag/entity/Tag.java (89%) rename src/main/java/synk/meeteam/domain/{ => common}/tag/entity/TagType.java (57%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/dto => common/tag/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/exception => common/tag/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/repository => common/tag/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/service => common/university/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_issue/api => common/university/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => common}/university/entity/University.java (81%) rename src/main/java/synk/meeteam/domain/{ => common}/university/exception/UniversityException.java (83%) rename src/main/java/synk/meeteam/domain/{ => common}/university/exception/UniversityExceptionType.java (93%) create mode 100644 src/main/java/synk/meeteam/domain/common/university/repository/UniversityRepository.java create mode 100644 src/main/java/synk/meeteam/domain/common/university/service/UniversityService.java delete mode 100644 src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamScope.java rename src/main/java/synk/meeteam/domain/{meeteam_issue/dto => meeteam/invited_user/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_issue/exception => meeteam/invited_user/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_invite/entity/MeeteamInvite.java => meeteam/invited_user/entity/InvitedUser.java} (74%) rename src/main/java/synk/meeteam/domain/{meeteam_issue/repository => meeteam/invited_user/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_issue/service => meeteam/invited_user/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_like/api => meeteam/invited_user/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_like/dto => meeteam/meeteam/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_like/exception => meeteam/meeteam/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/meeteam/{ => meeteam}/entity/Meeteam.java (64%) rename src/main/java/synk/meeteam/domain/meeteam/{ => meeteam}/entity/MeeteamStatus.java (62%) rename src/main/java/synk/meeteam/domain/{meeteam_like/repository => meeteam/meeteam/entity}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/meeteam/{ => meeteam}/exception/MeeteamException.java (83%) rename src/main/java/synk/meeteam/domain/meeteam/{ => meeteam}/exception/MeeteamExceptionType.java (85%) rename src/main/java/synk/meeteam/domain/{meeteam_like/service => meeteam/meeteam/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_link/api => meeteam/meeteam/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_link/dto => meeteam/meeteam_comment/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_link/exception => meeteam/meeteam_comment/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_comment/entity/MeeteamComment.java (83%) rename src/main/java/synk/meeteam/domain/{meeteam_link/repository => meeteam/meeteam_comment/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_link/service => meeteam/meeteam_comment/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_tag/api => meeteam/meeteam_comment/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_tag/dto => meeteam/meeteam_issue/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_tag/exception => meeteam/meeteam_issue/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_issue/entity/MeeteamIssue.java (88%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_issue/entity/MeeteamIssueType.java (90%) rename src/main/java/synk/meeteam/domain/{meeteam_tag/repository => meeteam/meeteam_issue/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{meeteam_tag/service => meeteam/meeteam_issue/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{member/api => meeteam/meeteam_issue/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{member/dto => meeteam/meeteam_like/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{member/exception => meeteam/meeteam_like/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_like/entity/MeeteamLike.java (84%) rename src/main/java/synk/meeteam/domain/{member/repository => meeteam/meeteam_like/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{member/service => meeteam/meeteam_like/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{notification/api => meeteam/meeteam_like/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{notification/dto => meeteam/meeteam_link/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{notification/exception => meeteam/meeteam_link/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_link/entity/LinkType.java (51%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_link/entity/MeeteamLink.java (86%) rename src/main/java/synk/meeteam/domain/{notification/repository => meeteam/meeteam_link/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{notification/service => meeteam/meeteam_link/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment => meeteam/meeteam_tag}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment => meeteam/meeteam_tag}/dto/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/meeteam_tag/entity/MeeteamTag.java (80%) rename src/main/java/synk/meeteam/domain/{recruitment/entity => meeteam/meeteam_tag/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment => meeteam/meeteam_tag}/repository/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment => meeteam/meeteam_tag}/service/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_applicant => meeteam/member}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_applicant => meeteam/member}/dto/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => meeteam}/member/entity/Member.java (82%) rename src/main/java/synk/meeteam/domain/{recruitment_applicant => meeteam/member}/exception/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_applicant => meeteam/member}/repository/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_applicant => meeteam/member}/service/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member => portfolio/portfolio}/api/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member => portfolio/portfolio}/dto/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java create mode 100644 src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioException.java rename src/main/java/synk/meeteam/domain/{recruitment/exception/RecruitmentExceptionType.java => portfolio/portfolio/exception/PortfolioExceptionType.java} (68%) rename src/main/java/synk/meeteam/domain/{recruitment_member/exception => portfolio/portfolio/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member/repository => portfolio/portfolio/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member/service => portfolio/portfolio_skill/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member_spec/api => portfolio/portfolio_skill/dto}/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/entity/PortfolioSkill.java rename src/main/java/synk/meeteam/domain/{recruitment_member_spec/dto => portfolio/portfolio_skill/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member_spec/exception => portfolio/portfolio_skill/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member_spec/repository => portfolio/portfolio_skill/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member_spec/service => recruitment/bookmark/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{role/api => recruitment/bookmark/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => recruitment}/bookmark/entity/Bookmark.java (83%) rename src/main/java/synk/meeteam/domain/{role/dto => recruitment/bookmark/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{role/exception => recruitment/bookmark/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{role/repository => recruitment/bookmark/service}/dummy.txt (100%) delete mode 100644 src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentException.java rename src/main/java/synk/meeteam/domain/{role/service => recruitment/recruitment_applicant/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{spec/api => recruitment/recruitment_applicant/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => recruitment}/recruitment_applicant/entity/RecruitmentApplicant.java (63%) rename src/main/java/synk/meeteam/domain/{spec/dto => recruitment/recruitment_applicant/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{spec/exception => recruitment/recruitment_applicant/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{spec/repository => recruitment/recruitment_applicant/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{spec/service => recruitment/recruitment_comment/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{tag/api => recruitment/recruitment_comment/dto}/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/entity/RecruitmentComment.java rename src/main/java/synk/meeteam/domain/{tag/dto => recruitment/recruitment_comment/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{tag/exception => recruitment/recruitment_comment/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{tag/repository => recruitment/recruitment_comment/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{tag/service => recruitment/recruitment_post/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{timetable_block/api => recruitment/recruitment_post/dto}/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/recruitment/recruitment_post/entity/RecruitmentPost.java create mode 100644 src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostException.java create mode 100644 src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostExceptionType.java rename src/main/java/synk/meeteam/domain/{timetable_block/dto => recruitment/recruitment_post/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{timetable_block/exception => recruitment/recruitment_post/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{timetable_block/repository => recruitment/recruitment_role/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{timetable_block/service => recruitment/recruitment_role/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{recruitment_member/entity/RecruitmentMember.java => recruitment/recruitment_role/entity/RecruitmentRole.java} (76%) rename src/main/java/synk/meeteam/domain/{university/api => recruitment/recruitment_role/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{university/dto => recruitment/recruitment_role/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user/api => recruitment/recruitment_role/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user/dto => recruitment/recruitment_role_skill/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest/api => recruitment/recruitment_role_skill/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest/entity/UserInterest.java => recruitment/recruitment_role_skill/entity/RecruitmentRoleSkill.java} (59%) rename src/main/java/synk/meeteam/domain/{user_interest/dto => recruitment/recruitment_role_skill/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest/exception => recruitment/recruitment_role_skill/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest/repository => recruitment/recruitment_role_skill/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest/service => recruitment/recruitment_tag/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest_tag/api => recruitment/recruitment_tag/dto}/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/entity/RecruitmentTag.java rename src/main/java/synk/meeteam/domain/{user_interest_tag/dto => recruitment/recruitment_tag/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest_tag/exception => recruitment/recruitment_tag/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_interest_tag/repository => recruitment/recruitment_tag/service}/dummy.txt (100%) delete mode 100644 src/main/java/synk/meeteam/domain/recruitment_member_spec/entity/RecruitmentMemberSpec.java rename src/main/java/synk/meeteam/domain/{user_interest_tag/service => sub/follow/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_link/api => sub/follow/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => sub}/follow/entity/Follow.java (88%) rename src/main/java/synk/meeteam/domain/{user_link/dto => sub/follow/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_link/exception => sub/follow/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_link/repository => sub/follow/service}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_link/service => sub/notification/api}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_spec/api => sub/notification/dto}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{ => sub}/notification/entity/Notification.java (89%) rename src/main/java/synk/meeteam/domain/{ => sub}/notification/entity/NotificationType.java (93%) rename src/main/java/synk/meeteam/domain/{user_spec/dto => sub/notification/exception}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_spec/exception => sub/notification/repository}/dummy.txt (100%) rename src/main/java/synk/meeteam/domain/{user_spec/repository => sub/notification/service}/dummy.txt (100%) delete mode 100644 src/main/java/synk/meeteam/domain/university/repository/UniversityRepository.java delete mode 100644 src/main/java/synk/meeteam/domain/university/service/UniversityService.java rename src/main/java/synk/meeteam/domain/{user_spec/service => user/evaluation/api}/dummy.txt (100%) create mode 100644 src/main/java/synk/meeteam/domain/user/evaluation/dto/dummy.txt rename src/main/java/synk/meeteam/domain/{ => user}/evaluation/entity/Evaluation.java (76%) rename src/main/java/synk/meeteam/domain/{ => user}/evaluation/exception/EvaluationException.java (84%) rename src/main/java/synk/meeteam/domain/{ => user}/evaluation/exception/EvaluationExceptionType.java (85%) create mode 100644 src/main/java/synk/meeteam/domain/user/evaluation/exception/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/evaluation/repository/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/evaluation/service/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user/api/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user/dto/dummy.txt rename src/main/java/synk/meeteam/domain/user/{ => user}/entity/User.java (59%) rename src/main/java/synk/meeteam/domain/user/{ => user}/entity/UserVO.java (90%) rename src/main/java/synk/meeteam/domain/user/{entity/enums/Role.java => user/entity/enums/Authority.java} (71%) rename src/main/java/synk/meeteam/domain/user/{ => user}/entity/enums/PlatformType.java (55%) rename src/main/java/synk/meeteam/domain/user/{ => user}/exception/UserException.java (84%) rename src/main/java/synk/meeteam/domain/user/{ => user}/exception/UserExceptionType.java (91%) rename src/main/java/synk/meeteam/domain/user/{ => user}/repository/UserRepository.java (85%) rename src/main/java/synk/meeteam/domain/user/{ => user}/service/UserService.java (76%) create mode 100644 src/main/java/synk/meeteam/domain/user/user_interest_tag/api/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_interest_tag/dto/dummy.txt rename src/main/java/synk/meeteam/domain/{ => user}/user_interest_tag/entity/UserInterestTag.java (84%) create mode 100644 src/main/java/synk/meeteam/domain/user/user_interest_tag/exception/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_interest_tag/repository/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_interest_tag/service/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_link/api/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_link/dto/dummy.txt rename src/main/java/synk/meeteam/domain/{ => user}/user_link/entity/UserLink.java (82%) create mode 100644 src/main/java/synk/meeteam/domain/user/user_link/exception/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_link/repository/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_link/service/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_skill/api/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_skill/dto/dummy.txt rename src/main/java/synk/meeteam/domain/{user_spec/entity/UserSpec.java => user/user_skill/entity/UserSkill.java} (66%) create mode 100644 src/main/java/synk/meeteam/domain/user/user_skill/exception/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_skill/repository/dummy.txt create mode 100644 src/main/java/synk/meeteam/domain/user/user_skill/service/dummy.txt rename src/main/java/synk/meeteam/{domain/base => global}/entity/BaseEntity.java (94%) rename src/main/java/synk/meeteam/{domain/base => global}/entity/BaseTimeEntity.java (94%) create mode 100644 src/main/java/synk/meeteam/global/entity/Category.java create mode 100644 src/main/java/synk/meeteam/global/entity/ProceedType.java create mode 100644 src/main/java/synk/meeteam/global/entity/Scope.java diff --git a/src/main/java/synk/meeteam/domain/auth/api/AuthApi.java b/src/main/java/synk/meeteam/domain/auth/api/AuthApi.java index fb843835..d8a7abb8 100644 --- a/src/main/java/synk/meeteam/domain/auth/api/AuthApi.java +++ b/src/main/java/synk/meeteam/domain/auth/api/AuthApi.java @@ -17,7 +17,7 @@ import synk.meeteam.domain.auth.dto.response.LogoutUserResponseDto; import synk.meeteam.domain.auth.dto.response.ReissueUserResponseDto; import synk.meeteam.domain.auth.dto.response.SignUpUserResponseDto; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.user.user.entity.User; import synk.meeteam.security.AuthUser; diff --git a/src/main/java/synk/meeteam/domain/auth/api/AuthController.java b/src/main/java/synk/meeteam/domain/auth/api/AuthController.java index 482375df..11a643ec 100644 --- a/src/main/java/synk/meeteam/domain/auth/api/AuthController.java +++ b/src/main/java/synk/meeteam/domain/auth/api/AuthController.java @@ -24,11 +24,11 @@ import synk.meeteam.domain.auth.dto.response.SignUpUserResponseDto; import synk.meeteam.domain.auth.service.AuthServiceProvider; import synk.meeteam.domain.auth.service.vo.UserSignUpVO; -import synk.meeteam.domain.university.service.UniversityService; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.UserVO; -import synk.meeteam.domain.user.entity.enums.Role; -import synk.meeteam.domain.user.service.UserService; +import synk.meeteam.domain.common.university.service.UniversityService; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.UserVO; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.service.UserService; import synk.meeteam.infra.mail.MailService; import synk.meeteam.infra.oauth.service.vo.enums.AuthType; import synk.meeteam.security.AuthUser; @@ -60,9 +60,9 @@ public ResponseEntity login( UserSignUpVO vo = authServiceProvider.getAuthService(requestDto.platformType()) .saveUserOrLogin(authorizationCode, requestDto); - if (vo.role() == Role.GUEST) { + if (vo.authority() == Authority.GUEST) { return ResponseEntity.ok(AuthUserResponseDto - .of(vo.platformId(), vo.authType(), vo.name(), vo.role(), null, null)); + .of(vo.platformId(), vo.authType(), vo.name(), vo.authority(), null, null)); } AuthUserResponseDto responseDTO = jwtService.issueToken(vo); @@ -74,11 +74,9 @@ public ResponseEntity login( public ResponseEntity createTempUserAndSendEmail( @RequestBody @Valid SignUpUserRequestDto requestDto ) { - Long universityId = universityService.getUniversityId(requestDto.universityName(), requestDto.departmentName(), - requestDto.email()); - - authServiceProvider.getAuthService(requestDto.platformType()).updateUniversityInfo(requestDto, universityId); - mailService.sendMail(requestDto, requestDto.platformId()); + String email = universityService.getEmail(requestDto.universityId(), requestDto.emailId()); + authServiceProvider.getAuthService(requestDto.platformType()).updateUniversityInfo(requestDto, email); + mailService.sendMail(requestDto.platformId(), email); return ResponseEntity.ok(SignUpUserResponseDto.of(requestDto.platformId())); } @@ -92,7 +90,7 @@ public ResponseEntity signUp( User user = authServiceProvider.getAuthService(userVO.getPlatformType()) .createSocialUser(userVO, requestDto.nickName()); - UserSignUpVO vo = UserSignUpVO.of(user, user.getPlatformType(), user.getRole(), AuthType.SIGN_UP); + UserSignUpVO vo = UserSignUpVO.of(user, user.getPlatformType(), user.getAuthority(), AuthType.SIGN_UP); AuthUserResponseDto responseDTO = jwtService.issueToken(vo); return ResponseEntity.status(HttpStatus.CREATED).body(responseDTO); diff --git a/src/main/java/synk/meeteam/domain/auth/dto/request/AuthUserRequestDto.java b/src/main/java/synk/meeteam/domain/auth/dto/request/AuthUserRequestDto.java index 0603029b..73fa9fb0 100644 --- a/src/main/java/synk/meeteam/domain/auth/dto/request/AuthUserRequestDto.java +++ b/src/main/java/synk/meeteam/domain/auth/dto/request/AuthUserRequestDto.java @@ -2,7 +2,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; @Schema(name = "AuthUserRequestDto", description = "소셜 로그인 요청 Dto") public record AuthUserRequestDto( diff --git a/src/main/java/synk/meeteam/domain/auth/dto/request/SignUpUserRequestDto.java b/src/main/java/synk/meeteam/domain/auth/dto/request/SignUpUserRequestDto.java index 7d3fbb00..795befad 100644 --- a/src/main/java/synk/meeteam/domain/auth/dto/request/SignUpUserRequestDto.java +++ b/src/main/java/synk/meeteam/domain/auth/dto/request/SignUpUserRequestDto.java @@ -2,7 +2,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; @Schema(name = "SignUpUserRequestDto", description = "임시 회원 가입 및 이메일 인증 요청 Dto") public record SignUpUserRequestDto( @@ -14,17 +14,16 @@ public record SignUpUserRequestDto( @Schema(description = "플랫폼 타입", example = "NAVER") PlatformType platformType, @NotNull - @Schema(description = "학사 이메일", example = "thdalsrb123@kw.ac.kr") - String email, + @Schema(description = "학사 이메일 계정", example = "thdalsrb123") + String emailId, @NotNull - @Schema(description = "학교 이름", example = "광운대학교") - String universityName, + @Schema(description = "학교 id", example = "광운대학교") + Long universityId, @NotNull - @Schema(description = "학과 이름", example = "소프트웨어학부") - String departmentName, + @Schema(description = "학과 id", example = "소프트웨어학부") + Long departmentId, @NotNull @Schema(description = "입학년도", example = "2018") int admissionYear - ) { } diff --git a/src/main/java/synk/meeteam/domain/auth/dto/response/AuthUserResponseDto.java b/src/main/java/synk/meeteam/domain/auth/dto/response/AuthUserResponseDto.java index fde22731..e069ae80 100644 --- a/src/main/java/synk/meeteam/domain/auth/dto/response/AuthUserResponseDto.java +++ b/src/main/java/synk/meeteam/domain/auth/dto/response/AuthUserResponseDto.java @@ -2,7 +2,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import jakarta.validation.constraints.NotNull; -import synk.meeteam.domain.user.entity.enums.Role; +import synk.meeteam.domain.user.user.entity.enums.Authority; import synk.meeteam.infra.oauth.service.vo.enums.AuthType; @Schema(name = "AuthUserResponseDto", description = "소셜 로그인 응답 Dto") @@ -18,13 +18,13 @@ public record AuthUserResponseDto( String userName, @NotNull @Schema(description = "역할, GUEST는 임시 유저", example = "USER") - Role role, + Authority authority, @Schema(description = "액세스 토큰", example = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJBY2Nlc3NUb2tlbiIsInBsYXRmb3JtSWQiOiJEaTdsQ2hNR3hqWlZUYWk2ZDc2SG8xWUxEVV94TDh0bDFDZmRQTVY1U1FNIiwicGxhdGZvcm1UeXBlIjoiTkFWRVIiLCJpYXQiOjE3MDYyODA1MjMsImV4cCI6MTgxNDI4MDUyM30.doPtAdLQMZ8NeuhRAOg7GNMBBtFZzPOOZp60HskGtZ0") String accessToken, @Schema(description = "리프레시 토큰", example = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJSZWZyZXNoVG9rZW4iLCJpYXQiOjE3MDYyODA1MjMsImV4cCI6MTcwNjg4NTMyM30.yvftTGVld0ZMnv1a79wpuzuTo8EJ1zOHoSlT_jfH3cs") String refreshToken) { - public static AuthUserResponseDto of(String platformId, AuthType authType, String userName, Role role, + public static AuthUserResponseDto of(String platformId, AuthType authType, String userName, Authority authority, String accessToken, String refreshToken) { - return new AuthUserResponseDto(platformId, authType, userName, role, accessToken, refreshToken); + return new AuthUserResponseDto(platformId, authType, userName, authority, accessToken, refreshToken); } } diff --git a/src/main/java/synk/meeteam/domain/auth/service/AuthService.java b/src/main/java/synk/meeteam/domain/auth/service/AuthService.java index 0aa10e43..c72bd949 100644 --- a/src/main/java/synk/meeteam/domain/auth/service/AuthService.java +++ b/src/main/java/synk/meeteam/domain/auth/service/AuthService.java @@ -6,13 +6,13 @@ import synk.meeteam.domain.auth.dto.request.AuthUserRequestDto; import synk.meeteam.domain.auth.dto.request.SignUpUserRequestDto; import synk.meeteam.domain.auth.service.vo.UserSignUpVO; -import synk.meeteam.domain.university.entity.University; -import synk.meeteam.domain.university.repository.UniversityRepository; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.UserVO; -import synk.meeteam.domain.user.entity.enums.PlatformType; -import synk.meeteam.domain.user.entity.enums.Role; -import synk.meeteam.domain.user.repository.UserRepository; +import synk.meeteam.domain.common.university.entity.University; +import synk.meeteam.domain.common.university.repository.UniversityRepository; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.UserVO; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.repository.UserRepository; import synk.meeteam.infra.redis.repository.RedisUserRepository; @Service @@ -41,7 +41,7 @@ protected User saveTempUser(AuthUserRequestDto request, String email, String nam .phoneNumber(phoneNumber) .platformType(request.platformType()) .platformId(id) - .role(Role.GUEST) + .authority(Authority.GUEST) .build(); } @@ -56,13 +56,12 @@ private static UserVO createTempSocialUser(String email, String name, PlatformTy .build(); } - public void updateUniversityInfo(SignUpUserRequestDto requestDTO, Long universityId) { - + public void updateUniversityInfo(SignUpUserRequestDto requestDTO, String email) { UserVO userVO = redisUserRepository.findByPlatformIdOrElseThrowException(requestDTO.platformId()); - userVO.updateUniversityId(universityId); - userVO.updateEmail(requestDTO.email()); + userVO.updateUniversityId(requestDTO.universityId()); userVO.updateAdmissionYear(requestDTO.admissionYear()); + userVO.updateEmail(email); redisUserRepository.save(userVO); } @@ -78,7 +77,7 @@ public User createSocialUser(UserVO userVO, String nickName) { .phoneNumber(userVO.getPhoneNumber()) .admissionYear(userVO.getAdmissionYear()) .university(foundUniversity) - .role(Role.USER) + .authority(Authority.USER) .platformType(userVO.getPlatformType()) .platformId(userVO.getPlatformId()) .build(); diff --git a/src/main/java/synk/meeteam/domain/auth/service/AuthServiceProvider.java b/src/main/java/synk/meeteam/domain/auth/service/AuthServiceProvider.java index e23daf99..f974f6a6 100644 --- a/src/main/java/synk/meeteam/domain/auth/service/AuthServiceProvider.java +++ b/src/main/java/synk/meeteam/domain/auth/service/AuthServiceProvider.java @@ -4,7 +4,7 @@ import java.util.concurrent.ConcurrentHashMap; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; import synk.meeteam.infra.oauth.service.NaverAuthService; @Component diff --git a/src/main/java/synk/meeteam/domain/auth/service/vo/UserSignUpVO.java b/src/main/java/synk/meeteam/domain/auth/service/vo/UserSignUpVO.java index a60ce3db..52a618a2 100644 --- a/src/main/java/synk/meeteam/domain/auth/service/vo/UserSignUpVO.java +++ b/src/main/java/synk/meeteam/domain/auth/service/vo/UserSignUpVO.java @@ -2,21 +2,21 @@ import lombok.Builder; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.enums.PlatformType; -import synk.meeteam.domain.user.entity.enums.Role; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; import synk.meeteam.infra.oauth.service.vo.enums.AuthType; @Builder -public record UserSignUpVO(Long userId, String email, String name, PlatformType platformType, Role role, +public record UserSignUpVO(Long userId, String email, String name, PlatformType platformType, Authority authority, String platformId, String phoneNumber, AuthType authType) { - public static UserSignUpVO of(User user, PlatformType platformType, Role role, AuthType authType) { + public static UserSignUpVO of(User user, PlatformType platformType, Authority authority, AuthType authType) { return UserSignUpVO.builder() .email(user.getEmail()) .name(user.getName()) .platformType(platformType) .platformId(user.getPlatformId()) - .role(role) + .authority(authority) .phoneNumber(user.getPhoneNumber()) .authType(authType) .build(); diff --git a/src/main/java/synk/meeteam/domain/base/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/department/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/base/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/department/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/base/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/department/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/base/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/department/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/common/department/entity/Department.java b/src/main/java/synk/meeteam/domain/common/department/entity/Department.java new file mode 100644 index 00000000..b44172b6 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/common/department/entity/Department.java @@ -0,0 +1,37 @@ +package synk.meeteam.domain.common.department.entity; + +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotNull; +import lombok.AccessLevel; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import synk.meeteam.domain.common.university.entity.University; + +@Entity +@Getter +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@AllArgsConstructor +public class Department { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "department_id") + private Long id; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "university_id") + private University university; + + @NotNull + @Column(length = 20) + private String name; +} diff --git a/src/main/java/synk/meeteam/domain/base/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/department/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/base/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/department/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/base/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/department/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/base/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/department/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/base/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/department/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/base/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/department/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/bookmark/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/field/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/bookmark/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/field/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/bookmark/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/field/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/bookmark/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/field/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/field/entity/Field.java b/src/main/java/synk/meeteam/domain/common/field/entity/Field.java similarity index 92% rename from src/main/java/synk/meeteam/domain/field/entity/Field.java rename to src/main/java/synk/meeteam/domain/common/field/entity/Field.java index 93445922..3aae5cb7 100644 --- a/src/main/java/synk/meeteam/domain/field/entity/Field.java +++ b/src/main/java/synk/meeteam/domain/common/field/entity/Field.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.field.entity; +package synk.meeteam.domain.common.field.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/synk/meeteam/domain/bookmark/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/field/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/bookmark/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/field/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/bookmark/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/field/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/bookmark/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/field/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/bookmark/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/field/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/bookmark/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/field/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/evaluation/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/output/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/evaluation/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/output/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/common/output/entity/Output.java b/src/main/java/synk/meeteam/domain/common/output/entity/Output.java new file mode 100644 index 00000000..db31bc74 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/common/output/entity/Output.java @@ -0,0 +1,36 @@ +package synk.meeteam.domain.common.output.entity; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.validation.constraints.NotNull; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.global.entity.BaseTimeEntity; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@DynamicInsert +public class Output extends BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "output_id") + private Long id; + + @NotNull + @ColumnDefault("0") + private Long totalSlideCnt; + + @NotNull + @ColumnDefault("0") + private Long totalLinkCnt; + +} diff --git a/src/main/java/synk/meeteam/domain/evaluation/entity/dummy.txt b/src/main/java/synk/meeteam/domain/common/output/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/entity/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/evaluation/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/output/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/evaluation/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/output/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/evaluation/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_link/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/evaluation/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_link/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/field/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_link/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/field/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_link/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/timetable_block/entity/TimetableBlock.java b/src/main/java/synk/meeteam/domain/common/output_link/entity/OutputLink.java similarity index 55% rename from src/main/java/synk/meeteam/domain/timetable_block/entity/TimetableBlock.java rename to src/main/java/synk/meeteam/domain/common/output_link/entity/OutputLink.java index 0421ea7b..b5d92f60 100644 --- a/src/main/java/synk/meeteam/domain/timetable_block/entity/TimetableBlock.java +++ b/src/main/java/synk/meeteam/domain/common/output_link/entity/OutputLink.java @@ -1,51 +1,42 @@ -package synk.meeteam.domain.timetable_block.entity; +package synk.meeteam.domain.common.output_link.entity; import static jakarta.persistence.FetchType.LAZY; import jakarta.persistence.Column; import jakarta.persistence.Entity; -import jakarta.persistence.EnumType; -import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import java.time.DayOfWeek; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.output.entity.Output; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class TimetableBlock { +public class OutputLink extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "timetable_block_id") + @Column(name = "output_link_id") private Long id; @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "user_id") - private User user; + @JoinColumn(name = "output_id") + private Output output; @NotNull - @Enumerated(EnumType.STRING) - @Column(length = 10) - private DayOfWeek dayOfWeek; + @NotBlank + @Column(length = 300) + @Size(max = 300) + private String url; - @NotNull - @Size(max = 5) - @Column(length = 5) - private String startTime; - - @NotNull - @Size(max = 5) - @Column(length = 5) - private String endTime; } diff --git a/src/main/java/synk/meeteam/domain/field/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_link/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/field/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_link/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/field/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_link/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/field/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_link/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/field/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_link/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/field/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_link/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/field/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_slide/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/field/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_slide/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/follow/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_slide/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/follow/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_slide/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/entity/Recruitment.java b/src/main/java/synk/meeteam/domain/common/output_slide/entity/OutputSlide.java similarity index 53% rename from src/main/java/synk/meeteam/domain/recruitment/entity/Recruitment.java rename to src/main/java/synk/meeteam/domain/common/output_slide/entity/OutputSlide.java index d08648b8..0b99a012 100644 --- a/src/main/java/synk/meeteam/domain/recruitment/entity/Recruitment.java +++ b/src/main/java/synk/meeteam/domain/common/output_slide/entity/OutputSlide.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.recruitment.entity; +package synk.meeteam.domain.common.output_slide.entity; import static jakarta.persistence.FetchType.LAZY; @@ -8,44 +8,42 @@ import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import jakarta.persistence.JoinColumn; -import jakarta.persistence.OneToOne; +import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import java.time.LocalDateTime; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.ColumnDefault; -import synk.meeteam.domain.base.entity.BaseEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.domain.common.output.entity.Output; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class Recruitment extends BaseEntity { +@DynamicInsert +public class OutputSlide extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "recruitment_id") + @Column(name = "output_slide_id") private Long id; - @OneToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "meeteam_id") - private Meeteam meeteam; + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "output_id") + private Output output; @NotNull - @Size(max = 50) - @Column(length = 50) - private String title; - - @Column(columnDefinition = "TEXT") - private String content; + @NotBlank + @Column(length = 300) + @Size(max = 300) + private String url; @NotNull @ColumnDefault("0") - private Boolean isOnline = false; + private Long seq; - @NotNull - private LocalDateTime deadline; } diff --git a/src/main/java/synk/meeteam/domain/follow/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_slide/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/follow/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_slide/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/follow/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_slide/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/follow/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_slide/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/follow/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/output_slide/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/follow/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/output_slide/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/follow/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/role/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/follow/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/role/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/role/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/role/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/role/entity/Role.java b/src/main/java/synk/meeteam/domain/common/role/entity/Role.java similarity index 92% rename from src/main/java/synk/meeteam/domain/role/entity/Role.java rename to src/main/java/synk/meeteam/domain/common/role/entity/Role.java index 2b9d7878..926b4564 100644 --- a/src/main/java/synk/meeteam/domain/role/entity/Role.java +++ b/src/main/java/synk/meeteam/domain/common/role/entity/Role.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.role.entity; +package synk.meeteam.domain.common.role.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; diff --git a/src/main/java/synk/meeteam/domain/meeteam/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/role/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/role/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/entity/dummy.txt b/src/main/java/synk/meeteam/domain/common/role/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam/entity/dummy.txt rename to src/main/java/synk/meeteam/domain/common/role/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/role/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/role/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/skill/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/skill/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/skill/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_comment/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/skill/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/spec/entity/Spec.java b/src/main/java/synk/meeteam/domain/common/skill/entity/Skill.java similarity index 84% rename from src/main/java/synk/meeteam/domain/spec/entity/Spec.java rename to src/main/java/synk/meeteam/domain/common/skill/entity/Skill.java index e0d4bfb4..d2c43cca 100644 --- a/src/main/java/synk/meeteam/domain/spec/entity/Spec.java +++ b/src/main/java/synk/meeteam/domain/common/skill/entity/Skill.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.spec.entity; +package synk.meeteam.domain.common.skill.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -15,10 +15,10 @@ @Setter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class Spec { +public class Skill { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "spec_id") + @Column(name = "skill_id") private Long id; @NotNull diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/skill/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_comment/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/skill/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/skill/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_comment/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/skill/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/skill/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_comment/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/skill/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/tag/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_comment/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/tag/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/tag/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_invite/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/tag/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/tag/entity/Tag.java b/src/main/java/synk/meeteam/domain/common/tag/entity/Tag.java similarity index 89% rename from src/main/java/synk/meeteam/domain/tag/entity/Tag.java rename to src/main/java/synk/meeteam/domain/common/tag/entity/Tag.java index 4056943e..2edc4923 100644 --- a/src/main/java/synk/meeteam/domain/tag/entity/Tag.java +++ b/src/main/java/synk/meeteam/domain/common/tag/entity/Tag.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.tag.entity; +package synk.meeteam.domain.common.tag.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -12,7 +12,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseEntity; +import synk.meeteam.global.entity.BaseEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/tag/entity/TagType.java b/src/main/java/synk/meeteam/domain/common/tag/entity/TagType.java similarity index 57% rename from src/main/java/synk/meeteam/domain/tag/entity/TagType.java rename to src/main/java/synk/meeteam/domain/common/tag/entity/TagType.java index 7f592df1..1cb2e4f7 100644 --- a/src/main/java/synk/meeteam/domain/tag/entity/TagType.java +++ b/src/main/java/synk/meeteam/domain/common/tag/entity/TagType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.tag.entity; +package synk.meeteam.domain.common.tag.entity; public enum TagType { COURSE, diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/dto/dummy.txt b/src/main/java/synk/meeteam/domain/common/tag/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_invite/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/common/tag/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/exception/dummy.txt b/src/main/java/synk/meeteam/domain/common/tag/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_invite/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/common/tag/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/repository/dummy.txt b/src/main/java/synk/meeteam/domain/common/tag/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_invite/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/common/tag/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/service/dummy.txt b/src/main/java/synk/meeteam/domain/common/university/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_invite/service/dummy.txt rename to src/main/java/synk/meeteam/domain/common/university/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/api/dummy.txt b/src/main/java/synk/meeteam/domain/common/university/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_issue/api/dummy.txt rename to src/main/java/synk/meeteam/domain/common/university/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/university/entity/University.java b/src/main/java/synk/meeteam/domain/common/university/entity/University.java similarity index 81% rename from src/main/java/synk/meeteam/domain/university/entity/University.java rename to src/main/java/synk/meeteam/domain/common/university/entity/University.java index 08b3516c..c2b9de33 100644 --- a/src/main/java/synk/meeteam/domain/university/entity/University.java +++ b/src/main/java/synk/meeteam/domain/common/university/entity/University.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.university.entity; +package synk.meeteam.domain.common.university.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -24,11 +24,7 @@ public class University { @NotNull @Column(length = 20) - private String universityName; - - @NotNull - @Column(length = 20) - private String departmentName; + private String name; @NotNull @Column(length = 20) diff --git a/src/main/java/synk/meeteam/domain/university/exception/UniversityException.java b/src/main/java/synk/meeteam/domain/common/university/exception/UniversityException.java similarity index 83% rename from src/main/java/synk/meeteam/domain/university/exception/UniversityException.java rename to src/main/java/synk/meeteam/domain/common/university/exception/UniversityException.java index da0349d6..9bf794f5 100644 --- a/src/main/java/synk/meeteam/domain/university/exception/UniversityException.java +++ b/src/main/java/synk/meeteam/domain/common/university/exception/UniversityException.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.university.exception; +package synk.meeteam.domain.common.university.exception; import synk.meeteam.global.common.exception.BaseCustomException; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/university/exception/UniversityExceptionType.java b/src/main/java/synk/meeteam/domain/common/university/exception/UniversityExceptionType.java similarity index 93% rename from src/main/java/synk/meeteam/domain/university/exception/UniversityExceptionType.java rename to src/main/java/synk/meeteam/domain/common/university/exception/UniversityExceptionType.java index 0c69af73..bf38e626 100644 --- a/src/main/java/synk/meeteam/domain/university/exception/UniversityExceptionType.java +++ b/src/main/java/synk/meeteam/domain/common/university/exception/UniversityExceptionType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.university.exception; +package synk.meeteam.domain.common.university.exception; import lombok.AccessLevel; import lombok.RequiredArgsConstructor; diff --git a/src/main/java/synk/meeteam/domain/common/university/repository/UniversityRepository.java b/src/main/java/synk/meeteam/domain/common/university/repository/UniversityRepository.java new file mode 100644 index 00000000..a293b8b0 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/common/university/repository/UniversityRepository.java @@ -0,0 +1,26 @@ +package synk.meeteam.domain.common.university.repository; + +import static synk.meeteam.domain.common.university.exception.UniversityExceptionType.NOT_FOUND_EMAIL_REGEX; +import static synk.meeteam.domain.common.university.exception.UniversityExceptionType.NOT_FOUND_UNIVERSITY_ID; + +import java.util.Optional; +import org.springframework.data.jpa.repository.JpaRepository; +import synk.meeteam.domain.common.university.entity.University; +import synk.meeteam.domain.common.university.exception.UniversityException; + +public interface UniversityRepository extends JpaRepository { + + Optional findByName(String name); + + default University findByNameOrElseThrowException(String name) { + return findByName(name).orElseThrow(() -> new UniversityException( + NOT_FOUND_EMAIL_REGEX)); + } + + Optional findById(Long id); + + default University findByIdOrElseThrowException(Long universityId) { + return findById(universityId).orElseThrow(() -> new UniversityException( + NOT_FOUND_UNIVERSITY_ID)); + } +} diff --git a/src/main/java/synk/meeteam/domain/common/university/service/UniversityService.java b/src/main/java/synk/meeteam/domain/common/university/service/UniversityService.java new file mode 100644 index 00000000..2bedcb0c --- /dev/null +++ b/src/main/java/synk/meeteam/domain/common/university/service/UniversityService.java @@ -0,0 +1,20 @@ +package synk.meeteam.domain.common.university.service; + +import lombok.RequiredArgsConstructor; +import org.springframework.stereotype.Service; +import synk.meeteam.domain.common.university.entity.University; +import synk.meeteam.domain.common.university.repository.UniversityRepository; + +@Service +@RequiredArgsConstructor +public class UniversityService { + + private final UniversityRepository universityRepository; + + public String getEmail(Long id, String emailId) { + University university = universityRepository.findByIdOrElseThrowException(id); + + String emailFormat = "%s@%s"; + return String.format(emailFormat, emailId, university.getEmailRegex()); + } +} diff --git a/src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamScope.java b/src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamScope.java deleted file mode 100644 index d1a4aa83..00000000 --- a/src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamScope.java +++ /dev/null @@ -1,6 +0,0 @@ -package synk.meeteam.domain.meeteam.entity; - -public enum MeeteamScope { - OFF_CAMPUS, //교외 - ON_CAMPUS //교내 -} diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/invited_user/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_issue/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/invited_user/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_issue/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_invite/entity/MeeteamInvite.java b/src/main/java/synk/meeteam/domain/meeteam/invited_user/entity/InvitedUser.java similarity index 74% rename from src/main/java/synk/meeteam/domain/meeteam_invite/entity/MeeteamInvite.java rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/entity/InvitedUser.java index f6210ffa..7b46b15e 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_invite/entity/MeeteamInvite.java +++ b/src/main/java/synk/meeteam/domain/meeteam/invited_user/entity/InvitedUser.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_invite.entity; +package synk.meeteam.domain.meeteam.invited_user.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @@ -25,14 +25,14 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(uniqueConstraints = { @UniqueConstraint( - name = "meeteam_invite_uk", + name = "invited_user_uk", columnNames = {"meeteam_id", "user_id"} ) }) -public class MeeteamInvite extends BaseEntity { +public class InvitedUser extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "meeteam_invite_id") + @Column(name = "invited_user_id") private Long id; @ManyToOne(fetch = LAZY, optional = false) diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/invited_user/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_issue/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/invited_user/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_issue/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/invited_user/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_like/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/invited_user/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_like/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_like/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/entity/Meeteam.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/Meeteam.java similarity index 64% rename from src/main/java/synk/meeteam/domain/meeteam/entity/Meeteam.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/Meeteam.java index ddf9365d..46498712 100644 --- a/src/main/java/synk/meeteam/domain/meeteam/entity/Meeteam.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/Meeteam.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam.entity; +package synk.meeteam.domain.meeteam.meeteam.entity; import static jakarta.persistence.FetchType.LAZY; @@ -13,20 +13,25 @@ import jakarta.persistence.ManyToOne; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; -import java.time.LocalDateTime; +import java.time.LocalDate; import lombok.AccessLevel; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.ColumnDefault; -import synk.meeteam.domain.base.entity.BaseEntity; -import synk.meeteam.domain.field.entity.Field; -import synk.meeteam.domain.user.entity.User; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.domain.common.field.entity.Field; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseEntity; +import synk.meeteam.global.entity.Category; +import synk.meeteam.global.entity.ProceedType; +import synk.meeteam.global.entity.Scope; @Getter @Setter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) +@DynamicInsert public class Meeteam extends BaseEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @@ -38,8 +43,8 @@ public class Meeteam extends BaseEntity { private User leader; @NotNull - @Column(length = 50) - @Size(max = 50) + @Column(length = 40) + @Size(max = 40) private String name; @NotNull @@ -58,31 +63,41 @@ public class Meeteam extends BaseEntity { //구인 글 존재 여부 @NotNull @ColumnDefault("0") - private Boolean isRecruiting = false; + private Boolean isRecruiting; //수업 여부 @NotNull @ColumnDefault("0") - private Boolean isCourse = false; + private Boolean isCourse; //범위 @NotNull @Enumerated(EnumType.STRING) @Column(length = 10) - private MeeteamScope scope; + private Scope scope; - //기간 시작일 + //유형 @NotNull - private LocalDateTime proceedingStart; + @Enumerated(EnumType.STRING) + private Category category; + + //진행방식 + @NotNull + @Enumerated(EnumType.STRING) + private ProceedType proceedType; + + //진행기간 시작일 + @NotNull + private LocalDate proceedingStart; - //기간 종료일 + //진행기간 종료일 @NotNull - private LocalDateTime proceedingEnd; + private LocalDate proceedingEnd; //공개 여부 @NotNull @ColumnDefault("1") - private Boolean isPublic = true; + private Boolean isPublic; @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "field_id") diff --git a/src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamStatus.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/MeeteamStatus.java similarity index 62% rename from src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamStatus.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/MeeteamStatus.java index 4597c1c9..05a065c5 100644 --- a/src/main/java/synk/meeteam/domain/meeteam/entity/MeeteamStatus.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/MeeteamStatus.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam.entity; +package synk.meeteam.domain.meeteam.meeteam.entity; public enum MeeteamStatus { PRODUCING, //진행중 diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_like/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/entity/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamException.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamException.java similarity index 83% rename from src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamException.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamException.java index 9268a05f..77584c93 100644 --- a/src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamException.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamException.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam.exception; +package synk.meeteam.domain.meeteam.meeteam.exception; import synk.meeteam.global.common.exception.BaseCustomException; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamExceptionType.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamExceptionType.java similarity index 85% rename from src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamExceptionType.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamExceptionType.java index 87f7ea13..8235e268 100644 --- a/src/main/java/synk/meeteam/domain/meeteam/exception/MeeteamExceptionType.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam/exception/MeeteamExceptionType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam.exception; +package synk.meeteam.domain.meeteam.meeteam.exception; import org.springframework.http.HttpStatus; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_like/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_link/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_link/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_link/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_comment/entity/MeeteamComment.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/entity/MeeteamComment.java similarity index 83% rename from src/main/java/synk/meeteam/domain/meeteam_comment/entity/MeeteamComment.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/entity/MeeteamComment.java index 8070ea50..723b8d47 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_comment/entity/MeeteamComment.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/entity/MeeteamComment.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_comment.entity; +package synk.meeteam.domain.meeteam.meeteam_comment.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_link/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_link/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_tag/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_comment/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_tag/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_tag/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssue.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssue.java similarity index 88% rename from src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssue.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssue.java index d52833c4..5036ce36 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssue.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssue.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_issue.entity; +package synk.meeteam.domain.meeteam.meeteam_issue.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -12,7 +12,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseEntity; +import synk.meeteam.global.entity.BaseEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssueType.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssueType.java similarity index 90% rename from src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssueType.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssueType.java index b965056d..37c90b97 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_issue/entity/MeeteamIssueType.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/entity/MeeteamIssueType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_issue.entity; +package synk.meeteam.domain.meeteam.meeteam_issue.entity; public enum MeeteamIssueType { NONE, diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_tag/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/meeteam_tag/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/member/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/member/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_issue/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/member/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/member/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/member/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/member/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_like/entity/MeeteamLike.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/entity/MeeteamLike.java similarity index 84% rename from src/main/java/synk/meeteam/domain/meeteam_like/entity/MeeteamLike.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/entity/MeeteamLike.java index 18153d2e..092d7a1f 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_like/entity/MeeteamLike.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/entity/MeeteamLike.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_like.entity; +package synk.meeteam.domain.meeteam.meeteam_like.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/member/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/member/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/member/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/member/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/notification/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_like/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/notification/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_like/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/notification/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/notification/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/notification/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/notification/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/entity/LinkType.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/LinkType.java similarity index 51% rename from src/main/java/synk/meeteam/domain/meeteam_link/entity/LinkType.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/LinkType.java index c304939f..53fe31de 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_link/entity/LinkType.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/LinkType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_link.entity; +package synk.meeteam.domain.meeteam.meeteam_link.entity; public enum LinkType { KAKAO, DISCORD, NOTION, SLACK diff --git a/src/main/java/synk/meeteam/domain/meeteam_link/entity/MeeteamLink.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/MeeteamLink.java similarity index 86% rename from src/main/java/synk/meeteam/domain/meeteam_link/entity/MeeteamLink.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/MeeteamLink.java index 0b6e53c9..06fd5eb9 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_link/entity/MeeteamLink.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/entity/MeeteamLink.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_link.entity; +package synk.meeteam.domain.meeteam.meeteam_link.entity; import static jakarta.persistence.FetchType.LAZY; @@ -16,8 +16,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/notification/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/notification/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/notification/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_link/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/notification/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_link/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/meeteam_tag/entity/MeeteamTag.java b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/entity/MeeteamTag.java similarity index 80% rename from src/main/java/synk/meeteam/domain/meeteam_tag/entity/MeeteamTag.java rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/entity/MeeteamTag.java index e034f538..ec5b9807 100644 --- a/src/main/java/synk/meeteam/domain/meeteam_tag/entity/MeeteamTag.java +++ b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/entity/MeeteamTag.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.meeteam_tag.entity; +package synk.meeteam.domain.meeteam.meeteam_tag.entity; import static jakarta.persistence.FetchType.LAZY; @@ -13,9 +13,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.tag.entity.Tag; +import synk.meeteam.domain.common.tag.entity.Tag; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/recruitment/entity/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment/entity/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/meeteam_tag/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/api/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/member/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/api/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/member/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/dto/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/member/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/member/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/member/entity/Member.java b/src/main/java/synk/meeteam/domain/meeteam/member/entity/Member.java similarity index 82% rename from src/main/java/synk/meeteam/domain/member/entity/Member.java rename to src/main/java/synk/meeteam/domain/meeteam/member/entity/Member.java index 642a7ad4..892c429d 100644 --- a/src/main/java/synk/meeteam/domain/member/entity/Member.java +++ b/src/main/java/synk/meeteam/domain/meeteam/member/entity/Member.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.member.entity; +package synk.meeteam.domain.meeteam.member.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,10 +15,10 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.role.entity.Role; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.role.entity.Role; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/exception/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/member/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/member/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/repository/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/member/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/member/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/service/dummy.txt b/src/main/java/synk/meeteam/domain/meeteam/member/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/service/dummy.txt rename to src/main/java/synk/meeteam/domain/meeteam/member/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/api/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member/api/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/dto/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java new file mode 100644 index 00000000..45dbd640 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/entity/Portfolio.java @@ -0,0 +1,78 @@ +package synk.meeteam.domain.portfolio.portfolio.entity; + +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.persistence.OneToOne; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import java.time.LocalDate; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import synk.meeteam.domain.common.field.entity.Field; +import synk.meeteam.domain.common.output.entity.Output; +import synk.meeteam.domain.common.role.entity.Role; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class Portfolio extends BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "portfolio_id") + private Long id; + + //유저 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "user_id") + private User user; + + //제목 + @NotNull + @Size(max = 40) + @Column(length = 40) + private String title; + + //부연설명 + @NotNull + private String description; + + //내용 + @NotNull + @Column(columnDefinition = "TEXT") + private String content; + + //진행기간 시작일 + @NotNull + private LocalDate proceedStart; + + //진행기간 종료일 + @NotNull + private LocalDate proceedEnd; + + //분야 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "field_id") + private Field field; + + //역할 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "role_id") + private Role role; + + //산출물 + @OneToOne(fetch = LAZY) + @JoinColumn(name = "output_id") + private Output output; +} diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioException.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioException.java new file mode 100644 index 00000000..5b6a605f --- /dev/null +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioException.java @@ -0,0 +1,10 @@ +package synk.meeteam.domain.portfolio.portfolio.exception; + +import synk.meeteam.global.common.exception.BaseCustomException; +import synk.meeteam.global.common.exception.ExceptionType; + +public class PortfolioException extends BaseCustomException { + public PortfolioException(ExceptionType exceptionType) { + super(exceptionType); + } +} diff --git a/src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentExceptionType.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioExceptionType.java similarity index 68% rename from src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentExceptionType.java rename to src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioExceptionType.java index 5225c57c..bba1fe12 100644 --- a/src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentExceptionType.java +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio/exception/PortfolioExceptionType.java @@ -1,9 +1,9 @@ -package synk.meeteam.domain.recruitment.exception; +package synk.meeteam.domain.portfolio.portfolio.exception; import org.springframework.http.HttpStatus; import synk.meeteam.global.common.exception.ExceptionType; -public enum RecruitmentExceptionType implements ExceptionType { +public enum PortfolioExceptionType implements ExceptionType { ; @Override diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/exception/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/repository/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/service/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member/service/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/api/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member_spec/api/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/entity/PortfolioSkill.java b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/entity/PortfolioSkill.java new file mode 100644 index 00000000..9f28d1ae --- /dev/null +++ b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/entity/PortfolioSkill.java @@ -0,0 +1,39 @@ +package synk.meeteam.domain.portfolio.portfolio_skill.entity; + +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import synk.meeteam.domain.common.skill.entity.Skill; +import synk.meeteam.domain.portfolio.portfolio.entity.Portfolio; +import synk.meeteam.global.entity.BaseTimeEntity; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class PortfolioSkill extends BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "portfolio_skill_id") + private Long id; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "portfolio_id") + private Portfolio portfolio; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "skill_id") + private Skill skill; + + +} diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/dto/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member_spec/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/exception/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member_spec/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/repository/dummy.txt b/src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member_spec/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/portfolio/portfolio_skill/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/bookmark/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/recruitment_member_spec/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/role/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/bookmark/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/role/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/bookmark/entity/Bookmark.java b/src/main/java/synk/meeteam/domain/recruitment/bookmark/entity/Bookmark.java similarity index 83% rename from src/main/java/synk/meeteam/domain/bookmark/entity/Bookmark.java rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/entity/Bookmark.java index 673c0ae9..f3e06a58 100644 --- a/src/main/java/synk/meeteam/domain/bookmark/entity/Bookmark.java +++ b/src/main/java/synk/meeteam/domain/recruitment/bookmark/entity/Bookmark.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.bookmark.entity; +package synk.meeteam.domain.recruitment.bookmark.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam.entity.Meeteam; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/role/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/bookmark/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/role/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/role/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/bookmark/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/role/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/role/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/bookmark/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/role/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/bookmark/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentException.java b/src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentException.java deleted file mode 100644 index f2d34094..00000000 --- a/src/main/java/synk/meeteam/domain/recruitment/exception/RecruitmentException.java +++ /dev/null @@ -1,10 +0,0 @@ -package synk.meeteam.domain.recruitment.exception; - -import synk.meeteam.global.common.exception.BaseCustomException; -import synk.meeteam.global.common.exception.ExceptionType; - -public class RecruitmentException extends BaseCustomException { - public RecruitmentException(ExceptionType exceptionType) { - super(exceptionType); - } -} diff --git a/src/main/java/synk/meeteam/domain/role/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/role/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/spec/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/spec/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_applicant/entity/RecruitmentApplicant.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/entity/RecruitmentApplicant.java similarity index 63% rename from src/main/java/synk/meeteam/domain/recruitment_applicant/entity/RecruitmentApplicant.java rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/entity/RecruitmentApplicant.java index 73c5b784..49514dda 100644 --- a/src/main/java/synk/meeteam/domain/recruitment_applicant/entity/RecruitmentApplicant.java +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/entity/RecruitmentApplicant.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.recruitment_applicant.entity; +package synk.meeteam.domain.recruitment.recruitment_applicant.entity; import static jakarta.persistence.FetchType.LAZY; @@ -13,9 +13,10 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.recruitment.entity.Recruitment; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.role.entity.Role; +import synk.meeteam.domain.recruitment.recruitment_post.entity.RecruitmentPost; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @@ -29,9 +30,17 @@ public class RecruitmentApplicant extends BaseTimeEntity { @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "recruitment_id") - private Recruitment recruitment; + private RecruitmentPost recruitmentPost; @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "applicant_id") private User applicant; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "role_id") + private Role role; + + //전할 말 + @Column(length = 300) + private String comment; } diff --git a/src/main/java/synk/meeteam/domain/spec/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/spec/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/spec/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/spec/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/spec/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/spec/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_applicant/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/spec/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/spec/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/tag/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/tag/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/entity/RecruitmentComment.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/entity/RecruitmentComment.java new file mode 100644 index 00000000..bdd33efc --- /dev/null +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/entity/RecruitmentComment.java @@ -0,0 +1,66 @@ +package synk.meeteam.domain.recruitment.recruitment_comment.entity; + +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.domain.recruitment.recruitment_post.entity.RecruitmentPost; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@DynamicInsert +public class RecruitmentComment extends BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "recruitment_comment_id") + private Long id; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "recruitment_post_id") + private RecruitmentPost recruitmentPost; + + //작성자 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "writer_id") + private User writer; + + //내용 + @NotNull + @Size(max = 100) + @Column(length = 100) + private String comment; + + //댓글, 대댓글 구분 + @NotNull + @ColumnDefault("1") + private Boolean isParent; + + //그룹 번호 + @NotNull + private Long groupNumber; + + //그룹 내 순서 + @NotNull + private Long groupOrder; + + @NotNull + @ColumnDefault("0") + private Boolean isDeleted; +} diff --git a/src/main/java/synk/meeteam/domain/tag/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/tag/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/tag/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/tag/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/tag/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/tag/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_comment/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/tag/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/tag/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_post/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/timetable_block/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/timetable_block/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_post/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/entity/RecruitmentPost.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/entity/RecruitmentPost.java new file mode 100644 index 00000000..ae5822bc --- /dev/null +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/entity/RecruitmentPost.java @@ -0,0 +1,108 @@ +package synk.meeteam.domain.recruitment.recruitment_post.entity; + +import static jakarta.persistence.FetchType.EAGER; +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import java.time.LocalDate; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.domain.common.field.entity.Field; +import synk.meeteam.domain.meeteam.meeteam.entity.Meeteam; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; +import synk.meeteam.global.entity.Category; +import synk.meeteam.global.entity.ProceedType; +import synk.meeteam.global.entity.Scope; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +@DynamicInsert +public class RecruitmentPost extends BaseTimeEntity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "recruitment_id") + private Long id; + + //작성자 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "writer_id") + private User writer; + + //제목 + @NotNull + @Size(max = 40) + @Column(length = 40) + private String title; + + //내용 + @Column(columnDefinition = "TEXT") + private String content; + + //범위 + @NotNull + @Enumerated(EnumType.STRING) + @Column(length = 10) + private Scope scope; + + //유형 + @NotNull + @Enumerated(EnumType.STRING) + private Category category; + + //분야 + @ManyToOne(fetch = EAGER, optional = false) + @JoinColumn(name = "field_id") + private Field field; + + //진행방식 + @NotNull + @Enumerated(EnumType.STRING) + private ProceedType proceedType; + + //진행기간 시작일 + @NotNull + private LocalDate proceedingStart; + + //진행기간 종료일 + @NotNull + private LocalDate proceedingEnd; + + //마감일 + @NotNull + private LocalDate deadline; + + //북마크 수 + private long bookmarkCount = 0L; + + //카카오톡 링크 + @Column(length = 300) + private String kakaoLink; + + //마감여부 저장 + @NotNull + @ColumnDefault("0") + private Boolean isClosed; + + //밋팀 + @ManyToOne(fetch = LAZY) + @JoinColumn(name = "meeteam_id") + private Meeteam meeteam; + +} diff --git a/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostException.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostException.java new file mode 100644 index 00000000..05d355d5 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostException.java @@ -0,0 +1,10 @@ +package synk.meeteam.domain.recruitment.recruitment_post.exception; + +import synk.meeteam.global.common.exception.BaseCustomException; +import synk.meeteam.global.common.exception.ExceptionType; + +public class RecruitmentPostException extends BaseCustomException { + public RecruitmentPostException(ExceptionType exceptionType) { + super(exceptionType); + } +} diff --git a/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostExceptionType.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostExceptionType.java new file mode 100644 index 00000000..7c66607b --- /dev/null +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/exception/RecruitmentPostExceptionType.java @@ -0,0 +1,18 @@ +package synk.meeteam.domain.recruitment.recruitment_post.exception; + +import org.springframework.http.HttpStatus; +import synk.meeteam.global.common.exception.ExceptionType; + +public enum RecruitmentPostExceptionType implements ExceptionType { + ; + + @Override + public HttpStatus httpStatus() { + return null; + } + + @Override + public String message() { + return null; + } +} diff --git a/src/main/java/synk/meeteam/domain/timetable_block/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/timetable_block/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_post/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/timetable_block/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_post/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/timetable_block/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_post/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/timetable_block/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/timetable_block/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/timetable_block/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/timetable_block/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member/entity/RecruitmentMember.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/entity/RecruitmentRole.java similarity index 76% rename from src/main/java/synk/meeteam/domain/recruitment_member/entity/RecruitmentMember.java rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/entity/RecruitmentRole.java index 183b1d3c..ba00d7da 100644 --- a/src/main/java/synk/meeteam/domain/recruitment_member/entity/RecruitmentMember.java +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/entity/RecruitmentRole.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.recruitment_member.entity; +package synk.meeteam.domain.recruitment.recruitment_role.entity; import static jakarta.persistence.FetchType.LAZY; @@ -14,14 +14,14 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.role.entity.Role; -import synk.meeteam.domain.recruitment.entity.Recruitment; +import synk.meeteam.domain.common.role.entity.Role; +import synk.meeteam.domain.recruitment.recruitment_post.entity.RecruitmentPost; @Getter @Setter @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) -public class RecruitmentMember { +public class RecruitmentRole { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "recruitment_member_id") @@ -29,7 +29,7 @@ public class RecruitmentMember { @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "recruitment_id") - private Recruitment recruitment; + private RecruitmentPost recruitmentPost; @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "role_id") diff --git a/src/main/java/synk/meeteam/domain/university/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/university/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/university/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/university/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest/entity/UserInterest.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/entity/RecruitmentRoleSkill.java similarity index 59% rename from src/main/java/synk/meeteam/domain/user_interest/entity/UserInterest.java rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/entity/RecruitmentRoleSkill.java index 9ca1d09a..3a5ccf35 100644 --- a/src/main/java/synk/meeteam/domain/user_interest/entity/UserInterest.java +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/entity/RecruitmentRoleSkill.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user_interest.entity; +package synk.meeteam.domain.recruitment.recruitment_role_skill.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.role.entity.Role; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.skill.entity.Skill; +import synk.meeteam.domain.recruitment.recruitment_role.entity.RecruitmentRole; @Getter @Setter @@ -25,21 +24,21 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(uniqueConstraints = { @UniqueConstraint( - name = "user_interest_uk", - columnNames = {"user_id", "interest_role_id"} + name = "recruitment_role_skill_uk", + columnNames = {"recruitment_role_id", "skill_id"} ) }) -public class UserInterest extends BaseTimeEntity { +public class RecruitmentRoleSkill { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "user_interest_id") + @Column(name = "recruitment_role_skill_id") private Long id; @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "user_id") - private User user; + @JoinColumn(name = "recruitment_role_id") + private RecruitmentRole recruitmentRole; @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "interest_role_id") - private Role role; + @JoinColumn(name = "skill_id") + private Skill skill; } diff --git a/src/main/java/synk/meeteam/domain/user_interest/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_role_skill/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest/service/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest/service/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/api/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest_tag/api/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/entity/RecruitmentTag.java b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/entity/RecruitmentTag.java new file mode 100644 index 00000000..5cbf3f78 --- /dev/null +++ b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/entity/RecruitmentTag.java @@ -0,0 +1,37 @@ +package synk.meeteam.domain.recruitment.recruitment_tag.entity; + +import static jakarta.persistence.FetchType.LAZY; + +import jakarta.persistence.Column; +import jakarta.persistence.Entity; +import jakarta.persistence.GeneratedValue; +import jakarta.persistence.GenerationType; +import jakarta.persistence.Id; +import jakarta.persistence.JoinColumn; +import jakarta.persistence.ManyToOne; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import synk.meeteam.domain.common.tag.entity.Tag; +import synk.meeteam.domain.recruitment.recruitment_post.entity.RecruitmentPost; + +@Getter +@Setter +@Entity +@NoArgsConstructor(access = AccessLevel.PROTECTED) +public class RecruitmentTag { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "recruitment_tag_id") + private Long id; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "recruitment_id") + private RecruitmentPost recruitmentPost; + + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "tag_id") + private Tag tag; + +} diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/dto/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest_tag/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/exception/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest_tag/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/repository/dummy.txt b/src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest_tag/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/recruitment/recruitment_tag/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/recruitment_member_spec/entity/RecruitmentMemberSpec.java b/src/main/java/synk/meeteam/domain/recruitment_member_spec/entity/RecruitmentMemberSpec.java deleted file mode 100644 index 4847502a..00000000 --- a/src/main/java/synk/meeteam/domain/recruitment_member_spec/entity/RecruitmentMemberSpec.java +++ /dev/null @@ -1,44 +0,0 @@ -package synk.meeteam.domain.recruitment_member_spec.entity; - -import static jakarta.persistence.FetchType.LAZY; - -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -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 jakarta.persistence.UniqueConstraint; -import lombok.AccessLevel; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import synk.meeteam.domain.spec.entity.Spec; -import synk.meeteam.domain.recruitment_member.entity.RecruitmentMember; - -@Getter -@Setter -@Entity -@NoArgsConstructor(access = AccessLevel.PROTECTED) -@Table(uniqueConstraints = { - @UniqueConstraint( - name = "recruitment_member_uk", - columnNames = {"recruitment_member_id", "spec_id"} - ) -}) -public class RecruitmentMemberSpec { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "recruitment_member_spec_id") - private Long id; - - @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "recruitment_member_id") - private RecruitmentMember recruitmentMember; - - @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "spec_id") - private Spec spec; -} diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/service/dummy.txt b/src/main/java/synk/meeteam/domain/sub/follow/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_interest_tag/service/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/follow/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_link/api/dummy.txt b/src/main/java/synk/meeteam/domain/sub/follow/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_link/api/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/follow/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/follow/entity/Follow.java b/src/main/java/synk/meeteam/domain/sub/follow/entity/Follow.java similarity index 88% rename from src/main/java/synk/meeteam/domain/follow/entity/Follow.java rename to src/main/java/synk/meeteam/domain/sub/follow/entity/Follow.java index ba9a37aa..a2ff82aa 100644 --- a/src/main/java/synk/meeteam/domain/follow/entity/Follow.java +++ b/src/main/java/synk/meeteam/domain/sub/follow/entity/Follow.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.follow.entity; +package synk.meeteam.domain.sub.follow.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,8 +15,8 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/user_link/dto/dummy.txt b/src/main/java/synk/meeteam/domain/sub/follow/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_link/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/follow/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_link/exception/dummy.txt b/src/main/java/synk/meeteam/domain/sub/follow/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_link/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/follow/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_link/repository/dummy.txt b/src/main/java/synk/meeteam/domain/sub/follow/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_link/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/follow/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_link/service/dummy.txt b/src/main/java/synk/meeteam/domain/sub/notification/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_link/service/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/notification/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_spec/api/dummy.txt b/src/main/java/synk/meeteam/domain/sub/notification/dto/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_spec/api/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/notification/dto/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/notification/entity/Notification.java b/src/main/java/synk/meeteam/domain/sub/notification/entity/Notification.java similarity index 89% rename from src/main/java/synk/meeteam/domain/notification/entity/Notification.java rename to src/main/java/synk/meeteam/domain/sub/notification/entity/Notification.java index bb882cf5..e2fb8c09 100644 --- a/src/main/java/synk/meeteam/domain/notification/entity/Notification.java +++ b/src/main/java/synk/meeteam/domain/sub/notification/entity/Notification.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.notification.entity; +package synk.meeteam.domain.sub.notification.entity; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -12,7 +12,7 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseEntity; +import synk.meeteam.global.entity.BaseEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/notification/entity/NotificationType.java b/src/main/java/synk/meeteam/domain/sub/notification/entity/NotificationType.java similarity index 93% rename from src/main/java/synk/meeteam/domain/notification/entity/NotificationType.java rename to src/main/java/synk/meeteam/domain/sub/notification/entity/NotificationType.java index 821ddcf6..972385ff 100644 --- a/src/main/java/synk/meeteam/domain/notification/entity/NotificationType.java +++ b/src/main/java/synk/meeteam/domain/sub/notification/entity/NotificationType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.notification.entity; +package synk.meeteam.domain.sub.notification.entity; public enum NotificationType { //U = USER, M = MEETEAM diff --git a/src/main/java/synk/meeteam/domain/user_spec/dto/dummy.txt b/src/main/java/synk/meeteam/domain/sub/notification/exception/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_spec/dto/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/notification/exception/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_spec/exception/dummy.txt b/src/main/java/synk/meeteam/domain/sub/notification/repository/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_spec/exception/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/notification/repository/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user_spec/repository/dummy.txt b/src/main/java/synk/meeteam/domain/sub/notification/service/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_spec/repository/dummy.txt rename to src/main/java/synk/meeteam/domain/sub/notification/service/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/university/repository/UniversityRepository.java b/src/main/java/synk/meeteam/domain/university/repository/UniversityRepository.java deleted file mode 100644 index ab9d69bb..00000000 --- a/src/main/java/synk/meeteam/domain/university/repository/UniversityRepository.java +++ /dev/null @@ -1,34 +0,0 @@ -package synk.meeteam.domain.university.repository; - -import static synk.meeteam.domain.university.exception.UniversityExceptionType.NOT_FOUND_EMAIL_REGEX; -import static synk.meeteam.domain.university.exception.UniversityExceptionType.NOT_FOUND_UNIVERSITY_AND_DEPARTMENT; -import static synk.meeteam.domain.university.exception.UniversityExceptionType.NOT_FOUND_UNIVERSITY_ID; - -import java.util.Optional; -import org.springframework.data.jpa.repository.JpaRepository; -import synk.meeteam.domain.auth.exception.AuthException; -import synk.meeteam.domain.university.entity.University; -import synk.meeteam.domain.university.exception.UniversityException; - -public interface UniversityRepository extends JpaRepository { - - Optional findByUniversityName(String universityName); - - default University findByUniversityNameOrElseThrowException(String universityName) { - return findByUniversityName(universityName).orElseThrow(() -> new UniversityException(NOT_FOUND_EMAIL_REGEX)); - } - - Optional findByUniversityNameAndDepartmentName(String universityName, String departmentName); - - default University findByUniversityNameAndDepartmentNameOrElseThrowException(String universityName, - String departmentName) { - return findByUniversityNameAndDepartmentName(universityName, departmentName).orElseThrow( - () -> new AuthException(NOT_FOUND_UNIVERSITY_AND_DEPARTMENT)); - } - - Optional findById(Long universityId); - - default University findByIdOrElseThrowException(Long universityId) { - return findById(universityId).orElseThrow(() -> new UniversityException(NOT_FOUND_UNIVERSITY_ID)); - } -} diff --git a/src/main/java/synk/meeteam/domain/university/service/UniversityService.java b/src/main/java/synk/meeteam/domain/university/service/UniversityService.java deleted file mode 100644 index c1a203af..00000000 --- a/src/main/java/synk/meeteam/domain/university/service/UniversityService.java +++ /dev/null @@ -1,34 +0,0 @@ -package synk.meeteam.domain.university.service; - -import static synk.meeteam.domain.auth.exception.AuthExceptionType.INVALID_MAIL_REGEX; - -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import synk.meeteam.domain.auth.exception.AuthException; -import synk.meeteam.domain.university.entity.University; -import synk.meeteam.domain.university.repository.UniversityRepository; - -@Service -@RequiredArgsConstructor -public class UniversityService { - - private final UniversityRepository universityRepository; - - public Long getUniversityId(String universityName, String departmentName, String email) { - University foundUniversity = universityRepository.findByUniversityNameAndDepartmentNameOrElseThrowException( - universityName, departmentName); - - String regex = extractEmailRegex(email); - - if (!foundUniversity.getEmailRegex().equals(regex)) { - throw new AuthException(INVALID_MAIL_REGEX); - } - - return foundUniversity.getId(); - } - - private String extractEmailRegex(String email) { - String[] split = email.split("@"); - return split[1]; - } -} diff --git a/src/main/java/synk/meeteam/domain/user_spec/service/dummy.txt b/src/main/java/synk/meeteam/domain/user/evaluation/api/dummy.txt similarity index 100% rename from src/main/java/synk/meeteam/domain/user_spec/service/dummy.txt rename to src/main/java/synk/meeteam/domain/user/evaluation/api/dummy.txt diff --git a/src/main/java/synk/meeteam/domain/user/evaluation/dto/dummy.txt b/src/main/java/synk/meeteam/domain/user/evaluation/dto/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/evaluation/entity/Evaluation.java b/src/main/java/synk/meeteam/domain/user/evaluation/entity/Evaluation.java similarity index 76% rename from src/main/java/synk/meeteam/domain/evaluation/entity/Evaluation.java rename to src/main/java/synk/meeteam/domain/user/evaluation/entity/Evaluation.java index f3c7835f..57a73280 100644 --- a/src/main/java/synk/meeteam/domain/evaluation/entity/Evaluation.java +++ b/src/main/java/synk/meeteam/domain/user/evaluation/entity/Evaluation.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.evaluation.entity; +package synk.meeteam.domain.user.evaluation.entity; import static jakarta.persistence.FetchType.LAZY; @@ -18,9 +18,11 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.member.entity.Member; -import synk.meeteam.domain.user.entity.User; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; +import synk.meeteam.domain.meeteam.member.entity.Member; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @@ -32,6 +34,7 @@ columnNames = {"user_id", "member_id"} ) }) +@DynamicInsert public class Evaluation extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @@ -52,17 +55,6 @@ public class Evaluation extends BaseTimeEntity { private String comment; @NotNull - private Long scoreTime; - - @NotNull - private Long scoreInfluence; - - @NotNull - private Long scoreParticipation; - - @NotNull - private Long scoreProfessionalism; - - @NotNull - private Boolean blind; + @ColumnDefault("0") + private Boolean isBlind; } diff --git a/src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationException.java b/src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationException.java similarity index 84% rename from src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationException.java rename to src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationException.java index 4621429c..62c6540f 100644 --- a/src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationException.java +++ b/src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationException.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.evaluation.exception; +package synk.meeteam.domain.user.evaluation.exception; import synk.meeteam.global.common.exception.BaseCustomException; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationExceptionType.java b/src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationExceptionType.java similarity index 85% rename from src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationExceptionType.java rename to src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationExceptionType.java index c88f1d11..7d2e8f18 100644 --- a/src/main/java/synk/meeteam/domain/evaluation/exception/EvaluationExceptionType.java +++ b/src/main/java/synk/meeteam/domain/user/evaluation/exception/EvaluationExceptionType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.evaluation.exception; +package synk.meeteam.domain.user.evaluation.exception; import org.springframework.http.HttpStatus; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/user/evaluation/exception/dummy.txt b/src/main/java/synk/meeteam/domain/user/evaluation/exception/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/evaluation/repository/dummy.txt b/src/main/java/synk/meeteam/domain/user/evaluation/repository/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/evaluation/service/dummy.txt b/src/main/java/synk/meeteam/domain/user/evaluation/service/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user/api/dummy.txt b/src/main/java/synk/meeteam/domain/user/user/api/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user/dto/dummy.txt b/src/main/java/synk/meeteam/domain/user/user/dto/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/entity/User.java b/src/main/java/synk/meeteam/domain/user/user/entity/User.java similarity index 59% rename from src/main/java/synk/meeteam/domain/user/entity/User.java rename to src/main/java/synk/meeteam/domain/user/user/entity/User.java index a6ae69c7..5ecc4165 100644 --- a/src/main/java/synk/meeteam/domain/user/entity/User.java +++ b/src/main/java/synk/meeteam/domain/user/user/entity/User.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.entity; +package synk.meeteam.domain.user.user.entity; import static jakarta.persistence.FetchType.LAZY; @@ -12,17 +12,22 @@ import jakarta.persistence.JoinColumn; import jakarta.persistence.ManyToOne; import jakarta.persistence.Table; +import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; import jakarta.validation.constraints.Size; import lombok.AccessLevel; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; +import org.hibernate.annotations.ColumnDefault; +import org.hibernate.annotations.DynamicInsert; import org.springframework.security.crypto.password.PasswordEncoder; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.university.entity.University; -import synk.meeteam.domain.user.entity.enums.PlatformType; -import synk.meeteam.domain.user.entity.enums.Role; +import synk.meeteam.domain.common.department.entity.Department; +import synk.meeteam.domain.common.role.entity.Role; +import synk.meeteam.domain.common.university.entity.University; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; +import synk.meeteam.global.entity.BaseTimeEntity; @@ -31,30 +36,37 @@ @Entity @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(name = "USERS") +@DynamicInsert public class User extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "user_id") private Long id; + //이메일 @NotNull @Size(max = 100) @Column(length = 100) private String email; + //이름 @NotNull @Size(max = 20) @Column(length = 20) private String name; + //닉네임 @NotNull - @Size(max = 20) - @Column(length = 20, unique = true) + @NotBlank + @Size(min = 4, max = 16) + @Column(length = 16, unique = true) private String nickname; - @Column(length = 100) + //비밀번호 + @Column(length = 16) private String password; + //전화번호 @Column(length = 15) private String phoneNumber; @@ -66,30 +78,66 @@ public class User extends BaseTimeEntity { @Column(columnDefinition = "TEXT") private String mainIntroduction; + //학점 private Double gpa; + //입학년도 @NotNull private Integer admissionYear; + //프로필 이미지 url @Column(length = 300) private String pictureUrl; //평가 점수 - private String evaluationScore; + @NotNull + @ColumnDefault("0") + private Double evaluationScore; - //학사 정보 + //학교 @ManyToOne(fetch = LAZY, optional = false) @JoinColumn(name = "university_id") private University university; + //학과 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "department_id") + private Department department; + + //관심있는 역할 + @ManyToOne(fetch = LAZY, optional = false) + @JoinColumn(name = "interest_role_id") + private Role interestRole; + @Enumerated(EnumType.STRING) - private Role role; + private Authority authority; @Enumerated(EnumType.STRING) private PlatformType platformType; // KAKAO, NAVER, GOOGLE, NONE private String platformId; + //평가 점수 + @NotNull + @ColumnDefault("0") + private Long scoreTime; + + @NotNull + @ColumnDefault("0") + private Long scoreInfluence; + + @NotNull + @ColumnDefault("0") + private Long scoreParticipation; + + @NotNull + @ColumnDefault("0") + private Long scoreCommunication; + + @NotNull + @ColumnDefault("0") + private Long scoreProfessionalism; + public void updateEmail(String email) { this.email = email; @@ -103,23 +151,10 @@ public void updateUniversity(University university){ this.university = university; } - public void updateRole(Role role){ - this.role = role; - } - - // 유저 권한 설정 메소드 - public void authorizeUser() { - this.role = Role.USER; - } - - // 비밀번호 암호화 메소드 - public void passwordEncode(PasswordEncoder passwordEncoder) { - this.password = passwordEncoder.encode(this.password); - } - @Builder public User(String email, String name, String nickname, String password, String phoneNumber, - Integer admissionYear, Role role, PlatformType platformType, String platformId, University university) { + Integer admissionYear, Authority authority, PlatformType platformType, String platformId, + University university) { this.email = email; this.university = university; this.name = name; @@ -127,8 +162,22 @@ public User(String email, String name, String nickname, String password, String this.password = password; this.phoneNumber = phoneNumber; this.admissionYear = admissionYear; - this.role = role; + this.authority = authority; this.platformType = platformType; this.platformId = platformId; } + + public void updateAuthority(Authority authority) { + this.authority = authority; + } + + // 비밀번호 암호화 메소드 + public void passwordEncode(PasswordEncoder passwordEncoder) { + this.password = passwordEncoder.encode(this.password); + } + + // 유저 권한 설정 메소드 + public void authorizeUser() { + this.authority = Authority.USER; + } } diff --git a/src/main/java/synk/meeteam/domain/user/entity/UserVO.java b/src/main/java/synk/meeteam/domain/user/user/entity/UserVO.java similarity index 90% rename from src/main/java/synk/meeteam/domain/user/entity/UserVO.java rename to src/main/java/synk/meeteam/domain/user/user/entity/UserVO.java index 6e6ea34a..66d82997 100644 --- a/src/main/java/synk/meeteam/domain/user/entity/UserVO.java +++ b/src/main/java/synk/meeteam/domain/user/user/entity/UserVO.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.entity; +package synk.meeteam.domain.user.user.entity; import lombok.Builder; import lombok.Getter; @@ -6,7 +6,7 @@ import org.springframework.data.annotation.Id; import org.springframework.data.redis.core.RedisHash; import org.springframework.data.redis.core.index.Indexed; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; @Getter @NoArgsConstructor @@ -27,6 +27,8 @@ public class UserVO { private Long universityId; + private Long departmentId; + private int admissionYear; @Indexed diff --git a/src/main/java/synk/meeteam/domain/user/entity/enums/Role.java b/src/main/java/synk/meeteam/domain/user/user/entity/enums/Authority.java similarity index 71% rename from src/main/java/synk/meeteam/domain/user/entity/enums/Role.java rename to src/main/java/synk/meeteam/domain/user/user/entity/enums/Authority.java index e3d4e7b6..53a403e5 100644 --- a/src/main/java/synk/meeteam/domain/user/entity/enums/Role.java +++ b/src/main/java/synk/meeteam/domain/user/user/entity/enums/Authority.java @@ -1,11 +1,11 @@ -package synk.meeteam.domain.user.entity.enums; +package synk.meeteam.domain.user.user.entity.enums; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor -public enum Role { +public enum Authority { GUEST("ROLE_GUEST"), USER("ROLE_USER"), ADMIN("ROLE_ADMIN"); diff --git a/src/main/java/synk/meeteam/domain/user/entity/enums/PlatformType.java b/src/main/java/synk/meeteam/domain/user/user/entity/enums/PlatformType.java similarity index 55% rename from src/main/java/synk/meeteam/domain/user/entity/enums/PlatformType.java rename to src/main/java/synk/meeteam/domain/user/user/entity/enums/PlatformType.java index ad1831fb..4e022b92 100644 --- a/src/main/java/synk/meeteam/domain/user/entity/enums/PlatformType.java +++ b/src/main/java/synk/meeteam/domain/user/user/entity/enums/PlatformType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.entity.enums; +package synk.meeteam.domain.user.user.entity.enums; public enum PlatformType { KAKAO, NAVER, GOOGLE, INTERNAL diff --git a/src/main/java/synk/meeteam/domain/user/exception/UserException.java b/src/main/java/synk/meeteam/domain/user/user/exception/UserException.java similarity index 84% rename from src/main/java/synk/meeteam/domain/user/exception/UserException.java rename to src/main/java/synk/meeteam/domain/user/user/exception/UserException.java index f0161ce6..c46c23e4 100644 --- a/src/main/java/synk/meeteam/domain/user/exception/UserException.java +++ b/src/main/java/synk/meeteam/domain/user/user/exception/UserException.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.exception; +package synk.meeteam.domain.user.user.exception; import synk.meeteam.global.common.exception.BaseCustomException; import synk.meeteam.global.common.exception.ExceptionType; diff --git a/src/main/java/synk/meeteam/domain/user/exception/UserExceptionType.java b/src/main/java/synk/meeteam/domain/user/user/exception/UserExceptionType.java similarity index 91% rename from src/main/java/synk/meeteam/domain/user/exception/UserExceptionType.java rename to src/main/java/synk/meeteam/domain/user/user/exception/UserExceptionType.java index ba687fbc..94ee0b1d 100644 --- a/src/main/java/synk/meeteam/domain/user/exception/UserExceptionType.java +++ b/src/main/java/synk/meeteam/domain/user/user/exception/UserExceptionType.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.exception; +package synk.meeteam.domain.user.user.exception; import lombok.RequiredArgsConstructor; import org.springframework.http.HttpStatus; diff --git a/src/main/java/synk/meeteam/domain/user/repository/UserRepository.java b/src/main/java/synk/meeteam/domain/user/user/repository/UserRepository.java similarity index 85% rename from src/main/java/synk/meeteam/domain/user/repository/UserRepository.java rename to src/main/java/synk/meeteam/domain/user/user/repository/UserRepository.java index 2292d26f..f2b10d57 100644 --- a/src/main/java/synk/meeteam/domain/user/repository/UserRepository.java +++ b/src/main/java/synk/meeteam/domain/user/user/repository/UserRepository.java @@ -1,12 +1,12 @@ -package synk.meeteam.domain.user.repository; +package synk.meeteam.domain.user.user.repository; import static synk.meeteam.domain.auth.exception.AuthExceptionType.NOT_FOUND_USER; import java.util.Optional; import org.springframework.data.jpa.repository.JpaRepository; import synk.meeteam.domain.auth.exception.AuthException; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; public interface UserRepository extends JpaRepository { Optional findById(Long userId); diff --git a/src/main/java/synk/meeteam/domain/user/service/UserService.java b/src/main/java/synk/meeteam/domain/user/user/service/UserService.java similarity index 76% rename from src/main/java/synk/meeteam/domain/user/service/UserService.java rename to src/main/java/synk/meeteam/domain/user/user/service/UserService.java index 6cbd85ca..f9ace95f 100644 --- a/src/main/java/synk/meeteam/domain/user/service/UserService.java +++ b/src/main/java/synk/meeteam/domain/user/user/service/UserService.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user.service; +package synk.meeteam.domain.user.user.service; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; diff --git a/src/main/java/synk/meeteam/domain/user/user_interest_tag/api/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_interest_tag/api/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_interest_tag/dto/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_interest_tag/dto/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user_interest_tag/entity/UserInterestTag.java b/src/main/java/synk/meeteam/domain/user/user_interest_tag/entity/UserInterestTag.java similarity index 84% rename from src/main/java/synk/meeteam/domain/user_interest_tag/entity/UserInterestTag.java rename to src/main/java/synk/meeteam/domain/user/user_interest_tag/entity/UserInterestTag.java index eb1cd75b..60801c2f 100644 --- a/src/main/java/synk/meeteam/domain/user_interest_tag/entity/UserInterestTag.java +++ b/src/main/java/synk/meeteam/domain/user/user_interest_tag/entity/UserInterestTag.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user_interest_tag.entity; +package synk.meeteam.domain.user.user_interest_tag.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.tag.entity.Tag; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.tag.entity.Tag; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/user/user_interest_tag/exception/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_interest_tag/exception/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_interest_tag/repository/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_interest_tag/repository/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_interest_tag/service/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_interest_tag/service/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_link/api/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_link/api/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_link/dto/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_link/dto/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user_link/entity/UserLink.java b/src/main/java/synk/meeteam/domain/user/user_link/entity/UserLink.java similarity index 82% rename from src/main/java/synk/meeteam/domain/user_link/entity/UserLink.java rename to src/main/java/synk/meeteam/domain/user/user_link/entity/UserLink.java index 4901e9fb..3ece94b0 100644 --- a/src/main/java/synk/meeteam/domain/user_link/entity/UserLink.java +++ b/src/main/java/synk/meeteam/domain/user/user_link/entity/UserLink.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user_link.entity; +package synk.meeteam.domain.user.user_link.entity; import static jakarta.persistence.FetchType.LAZY; @@ -16,9 +16,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.meeteam_link.entity.LinkType; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.meeteam.meeteam_link.entity.LinkType; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter diff --git a/src/main/java/synk/meeteam/domain/user/user_link/exception/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_link/exception/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_link/repository/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_link/repository/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_link/service/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_link/service/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_skill/api/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_skill/api/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_skill/dto/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_skill/dto/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user_spec/entity/UserSpec.java b/src/main/java/synk/meeteam/domain/user/user_skill/entity/UserSkill.java similarity index 66% rename from src/main/java/synk/meeteam/domain/user_spec/entity/UserSpec.java rename to src/main/java/synk/meeteam/domain/user/user_skill/entity/UserSkill.java index 507056d9..996ce6df 100644 --- a/src/main/java/synk/meeteam/domain/user_spec/entity/UserSpec.java +++ b/src/main/java/synk/meeteam/domain/user/user_skill/entity/UserSkill.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.user_spec.entity; +package synk.meeteam.domain.user.user_skill.entity; import static jakarta.persistence.FetchType.LAZY; @@ -15,9 +15,9 @@ import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; -import synk.meeteam.domain.base.entity.BaseTimeEntity; -import synk.meeteam.domain.spec.entity.Spec; -import synk.meeteam.domain.user.entity.User; +import synk.meeteam.domain.common.skill.entity.Skill; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.global.entity.BaseTimeEntity; @Getter @Setter @@ -25,14 +25,14 @@ @NoArgsConstructor(access = AccessLevel.PROTECTED) @Table(uniqueConstraints = { @UniqueConstraint( - name = "user_spec_uk", - columnNames = {"user_id", "spec_id"} + name = "user_skill_uk", + columnNames = {"user_id", "skill_id"} ) }) -public class UserSpec extends BaseTimeEntity { +public class UserSkill extends BaseTimeEntity { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "user_spec_id") + @Column(name = "user_skill_id") private Long id; @ManyToOne(fetch = LAZY, optional = false) @@ -40,6 +40,6 @@ public class UserSpec extends BaseTimeEntity { private User user; @ManyToOne(fetch = LAZY, optional = false) - @JoinColumn(name = "spec_id") - private Spec spec; + @JoinColumn(name = "skill_id") + private Skill skill; } diff --git a/src/main/java/synk/meeteam/domain/user/user_skill/exception/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_skill/exception/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_skill/repository/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_skill/repository/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/user/user_skill/service/dummy.txt b/src/main/java/synk/meeteam/domain/user/user_skill/service/dummy.txt new file mode 100644 index 00000000..e69de29b diff --git a/src/main/java/synk/meeteam/domain/base/entity/BaseEntity.java b/src/main/java/synk/meeteam/global/entity/BaseEntity.java similarity index 94% rename from src/main/java/synk/meeteam/domain/base/entity/BaseEntity.java rename to src/main/java/synk/meeteam/global/entity/BaseEntity.java index fbb1aff9..ceded167 100644 --- a/src/main/java/synk/meeteam/domain/base/entity/BaseEntity.java +++ b/src/main/java/synk/meeteam/global/entity/BaseEntity.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.base.entity; +package synk.meeteam.global.entity; import jakarta.persistence.Column; import jakarta.persistence.EntityListeners; diff --git a/src/main/java/synk/meeteam/domain/base/entity/BaseTimeEntity.java b/src/main/java/synk/meeteam/global/entity/BaseTimeEntity.java similarity index 94% rename from src/main/java/synk/meeteam/domain/base/entity/BaseTimeEntity.java rename to src/main/java/synk/meeteam/global/entity/BaseTimeEntity.java index f2460362..c34369f6 100644 --- a/src/main/java/synk/meeteam/domain/base/entity/BaseTimeEntity.java +++ b/src/main/java/synk/meeteam/global/entity/BaseTimeEntity.java @@ -1,4 +1,4 @@ -package synk.meeteam.domain.base.entity; +package synk.meeteam.global.entity; import jakarta.persistence.Column; import jakarta.persistence.EntityListeners; diff --git a/src/main/java/synk/meeteam/global/entity/Category.java b/src/main/java/synk/meeteam/global/entity/Category.java new file mode 100644 index 00000000..0a6b2374 --- /dev/null +++ b/src/main/java/synk/meeteam/global/entity/Category.java @@ -0,0 +1,5 @@ +package synk.meeteam.global.entity; + +public enum Category { + CATEGORY +} diff --git a/src/main/java/synk/meeteam/global/entity/ProceedType.java b/src/main/java/synk/meeteam/global/entity/ProceedType.java new file mode 100644 index 00000000..ee953d8e --- /dev/null +++ b/src/main/java/synk/meeteam/global/entity/ProceedType.java @@ -0,0 +1,7 @@ +package synk.meeteam.global.entity; + +public enum ProceedType { + ON_LINE, + OFF_LINE, + ON_AND_OFFLINE +} diff --git a/src/main/java/synk/meeteam/global/entity/Scope.java b/src/main/java/synk/meeteam/global/entity/Scope.java new file mode 100644 index 00000000..39b6ad58 --- /dev/null +++ b/src/main/java/synk/meeteam/global/entity/Scope.java @@ -0,0 +1,6 @@ +package synk.meeteam.global.entity; + +public enum Scope { + OFF_CAMPUS, //교외 + ON_CAMPUS //교내 +} diff --git a/src/main/java/synk/meeteam/infra/mail/MailService.java b/src/main/java/synk/meeteam/infra/mail/MailService.java index 7cd716c2..65bb0e0a 100644 --- a/src/main/java/synk/meeteam/infra/mail/MailService.java +++ b/src/main/java/synk/meeteam/infra/mail/MailService.java @@ -18,9 +18,8 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.stereotype.Service; -import synk.meeteam.domain.auth.dto.request.SignUpUserRequestDto; import synk.meeteam.domain.auth.exception.AuthException; -import synk.meeteam.domain.user.entity.UserVO; +import synk.meeteam.domain.user.user.entity.UserVO; import synk.meeteam.infra.redis.repository.RedisUserRepository; @Service @@ -31,14 +30,13 @@ public class MailService { private final JavaMailSender mailSender; private final RedisUserRepository redisUserRepository; - public void sendMail(SignUpUserRequestDto requestDTO, String platformId) { + public void sendMail(String platformId, String receiverMail) { String newEmailCode = UUID.randomUUID().toString(); UserVO userVO = redisUserRepository.findByPlatformIdOrElseThrowException(platformId); userVO.updateEmailCode(newEmailCode); redisUserRepository.save(userVO); - String receiverMail = requestDTO.email(); MimeMessage message = mailSender.createMimeMessage(); try { diff --git a/src/main/java/synk/meeteam/infra/oauth/service/NaverAuthService.java b/src/main/java/synk/meeteam/infra/oauth/service/NaverAuthService.java index 129a88a7..809ce2ad 100644 --- a/src/main/java/synk/meeteam/infra/oauth/service/NaverAuthService.java +++ b/src/main/java/synk/meeteam/infra/oauth/service/NaverAuthService.java @@ -10,10 +10,10 @@ import synk.meeteam.domain.auth.exception.AuthExceptionType; import synk.meeteam.domain.auth.service.AuthService; import synk.meeteam.domain.auth.service.vo.UserSignUpVO; -import synk.meeteam.domain.university.repository.UniversityRepository; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.enums.Role; -import synk.meeteam.domain.user.repository.UserRepository; +import synk.meeteam.domain.common.university.repository.UniversityRepository; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.repository.UserRepository; import synk.meeteam.infra.oauth.service.vo.NaverMemberVO; import synk.meeteam.infra.oauth.service.vo.NaverTokenVO; import synk.meeteam.infra.oauth.service.vo.enums.AuthType; @@ -47,7 +47,7 @@ public UserSignUpVO saveUserOrLogin(String authorizationCode, AuthUserRequestDto User foundUser = getUser(request.platformType(), naverMemberInfo.getResponse().getId()); if (foundUser != null) { - return UserSignUpVO.of(foundUser, request.platformType(), Role.USER, AuthType.LOGIN); + return UserSignUpVO.of(foundUser, request.platformType(), Authority.USER, AuthType.LOGIN); } // redis 사용, 무조건 새로 회원가입하는 경우 @@ -55,7 +55,7 @@ public UserSignUpVO saveUserOrLogin(String authorizationCode, AuthUserRequestDto naverMemberInfo.getResponse().getName(), naverMemberInfo.getResponse().getId(), naverMemberInfo.getResponse().getMobile()); - return UserSignUpVO.of(savedUser, request.platformType(), Role.GUEST, AuthType.SIGN_UP); + return UserSignUpVO.of(savedUser, request.platformType(), Authority.GUEST, AuthType.SIGN_UP); } diff --git a/src/main/java/synk/meeteam/infra/redis/repository/RedisUserRepository.java b/src/main/java/synk/meeteam/infra/redis/repository/RedisUserRepository.java index 490b04fb..814a9454 100644 --- a/src/main/java/synk/meeteam/infra/redis/repository/RedisUserRepository.java +++ b/src/main/java/synk/meeteam/infra/redis/repository/RedisUserRepository.java @@ -6,7 +6,7 @@ import java.util.Optional; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; -import synk.meeteam.domain.user.entity.UserVO; +import synk.meeteam.domain.user.user.entity.UserVO; import synk.meeteam.infra.redis.exception.RedisException; @Repository diff --git a/src/main/java/synk/meeteam/security/CustomAuthUser.java b/src/main/java/synk/meeteam/security/CustomAuthUser.java index eafad872..f3ecb03e 100644 --- a/src/main/java/synk/meeteam/security/CustomAuthUser.java +++ b/src/main/java/synk/meeteam/security/CustomAuthUser.java @@ -5,15 +5,15 @@ import lombok.RequiredArgsConstructor; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.enums.Role; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.enums.Authority; @Getter @RequiredArgsConstructor public class CustomAuthUser implements UserDetails { private final User user; - private final Role authority; + private final Authority authority; @Override public Collection getAuthorities() { diff --git a/src/main/java/synk/meeteam/security/jwt/service/JwtService.java b/src/main/java/synk/meeteam/security/jwt/service/JwtService.java index 640befea..de692bb9 100644 --- a/src/main/java/synk/meeteam/security/jwt/service/JwtService.java +++ b/src/main/java/synk/meeteam/security/jwt/service/JwtService.java @@ -1,7 +1,6 @@ package synk.meeteam.security.jwt.service; - import static synk.meeteam.domain.auth.exception.AuthExceptionType.INVALID_ACCESS_TOKEN; import static synk.meeteam.domain.auth.exception.AuthExceptionType.INVALID_REFRESH_TOKEN; import static synk.meeteam.domain.auth.exception.AuthExceptionType.UNAUTHORIZED_ACCESS_TOKEN; @@ -25,10 +24,10 @@ import synk.meeteam.domain.auth.exception.AuthException; import synk.meeteam.domain.auth.exception.AuthExceptionType; import synk.meeteam.domain.auth.service.vo.UserSignUpVO; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.entity.enums.PlatformType; -import synk.meeteam.domain.user.entity.enums.Role; -import synk.meeteam.domain.user.repository.UserRepository; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.entity.enums.Authority; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.repository.UserRepository; import synk.meeteam.infra.redis.repository.RedisTokenRepository; import synk.meeteam.security.jwt.service.vo.TokenVO; @@ -66,10 +65,11 @@ public class JwtService { public AuthUserResponseDto issueToken(UserSignUpVO vo) { String accessToken = jwtTokenProvider.createAccessToken(vo.platformId(), vo.platformType(), accessTokenExpirationPeriod); - if (vo.role().equals(Role.USER)) { + if (vo.authority().equals(Authority.USER)) { String refreshToken = jwtTokenProvider.createRefreshToken(refreshTokenExpirationPeriod); updateRefreshTokenByPlatformId(vo.platformId(), refreshToken); - return AuthUserResponseDto.of(vo.platformId(), vo.authType(), vo.name(), Role.USER, accessToken, refreshToken); + return AuthUserResponseDto.of(vo.platformId(), vo.authType(), vo.name(), Authority.USER, accessToken, + refreshToken); } throw new AuthException(AuthExceptionType.UNAUTHORIZED_MEMBER_LOGIN); diff --git a/src/main/java/synk/meeteam/security/jwt/service/JwtTokenProvider.java b/src/main/java/synk/meeteam/security/jwt/service/JwtTokenProvider.java index 8f43c889..41fe7743 100644 --- a/src/main/java/synk/meeteam/security/jwt/service/JwtTokenProvider.java +++ b/src/main/java/synk/meeteam/security/jwt/service/JwtTokenProvider.java @@ -12,7 +12,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; -import synk.meeteam.domain.user.entity.enums.PlatformType; +import synk.meeteam.domain.user.user.entity.enums.PlatformType; @Slf4j @Component diff --git a/src/main/java/synk/meeteam/security/service/MemberAuthService.java b/src/main/java/synk/meeteam/security/service/MemberAuthService.java index e5d84c8e..c6fa01e4 100644 --- a/src/main/java/synk/meeteam/security/service/MemberAuthService.java +++ b/src/main/java/synk/meeteam/security/service/MemberAuthService.java @@ -6,8 +6,8 @@ import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; -import synk.meeteam.domain.user.entity.User; -import synk.meeteam.domain.user.repository.UserRepository; +import synk.meeteam.domain.user.user.entity.User; +import synk.meeteam.domain.user.user.repository.UserRepository; import synk.meeteam.security.CustomAuthUser; @Service @@ -19,6 +19,6 @@ public class MemberAuthService implements UserDetailsService { public UserDetails loadUserByUsername(String platformId) throws UsernameNotFoundException { User user = userRepository.findByPlatformIdOrElseThrowException(platformId); - return new CustomAuthUser(user, user.getRole()); + return new CustomAuthUser(user, user.getAuthority()); } }