-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Team - 18 / 검봉 & Tany] 1주차 첫 번째 PR #24
[Team - 18 / 검봉 & Tany] 1주차 첫 번째 PR #24
Conversation
프로젝트 생성 - Gradle 환경 - 의존성추가(Validation, Spring Web, MySQL, Lombok)
Entity - User - Accommodation - AccommodationInfo - AccommodationPrice - Review - Region Enum - AccommodationType (숙소 타입)
Entity - Accommodation (One) - AccommodationInfo (toOne) - AccommodationPrice (toOne) - Review (toMany)
application.yml - MySQL 연결을 위한 설정 파일 추가
Accmmodation - Region필드 - accommodationImg AccommodationInfo - numberOfBed - numberOfBath - maximumNumberOfGuests Reservation - 예약 엔티티 추가 Review - user
Accommodation 엔티티에 있던 accommodationImg 필드를 Info 엔티티로 옮기고, Main, DetailImg 로 분리
지금까지의 DB 요구사항 분석 및 ERD 다이어그램 추가
* [#23] Style: DTO 클래스 코드 포맷팅 수정 - DTO 클래스의 코드 포맷팅을 수정하였습니다. * [#23] Style: AccommodationController 클래스의 코드 포맷팅 수정 * [#23] Refactor: 서비스 및 레포지토리 클래스 리팩토링 - AccommodationService 클래스 코드 포맷팅 수정 및 예약 날짜 필터링 로직 추가하였습니다. - AccommodationRepository 클래스 코드 포맷팅 및 정의한 findByDateBetween() 메서드를 제거하였습니다. 이는 자바 코드 기반으로 예약 날짜를 필터링하게 수정하였기 때문입니다. * [#23] Refactor: Accommodation 도메인 클래스 리팩토링 - Accommodation 클래스에 예약 날짜 필터링 메소드 추가 및 코드 포맷팅을 수정하였습니다. * [#23] Refactor: PeopleConstraint 클래스 추가 - 기존의 Map 컬렉션으로 관리되었던 수용인원 정보에 대하여,PeopleConstraint 클래스를 통해 관리되도록 리팩토링 하였습니다.
* feat: SearchBar 컴포넌트 추가 * Merge branch 'dev' into 'feature/2'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
검봉 & Tany! 반갑습니다. 그리고 리뷰가 많이 늦어서 죄송합니다.
도메인 모델 정의와 JPA를 사용하여 맵핑을 해주셨군요.
모델에 대한 고민과 맵핑도 잘해주셔서 간단한 코멘트만 남겨두었습니다.
하나 주의할 점은 OneToOne 맵핑을 쓸때,
- 꼭 테이블을 나눠야하는지.
- 나눠야한다면 FK를 어느 테이블에 둘지,
- 맵핑은 단방향/양방향중 어떤걸 쓸지
에 대해서 한번 더 고민해봐주시고 사용해주시면 좋을 것 같습니다.
실제 로직이 들어가면 테스트코드와 아키텍처도 함께 리뷰할게요! 수고많으셨습니다!!
@Id @GeneratedValue | ||
@Column(name = "accommdationInfo_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
어노테이션은 한줄에 하나씩 쓰는게 좋을 것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
컬럼명을 굳이 accommodationInfo_id로 명시해줄 이유가 있을까요?
혹시 다른 엔티티에서 JoinColumn 속성에 사용할 목적으로 쓴 것이라면, 여기서 정의하는 테이블 컬럼명과는 무관하다고 보시면 됩니다!
어차피 여기서는 식별자로써의 역할만 하기 때문에 id로 두어도 충분할 거라 생각되네요!
그리고 구체적인 이름을 명시하고자한다해도, snake_case와 camel_case가 섞여있네요 ㅠㅠ
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
지금 확인해보니 딱히 사용할 이유가 없는거 같습니다.
습관적으로 camel_case를 사용하였는데 바로 수정하도록 하겠습니다.
감사합니다.
@JoinColumn(name = "usee_id") | ||
private User userId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usee_id..? 오타가 있네요!!
그리고 User 엔티티를 직접 참조하고있는데 필드명이 userId네요~ user로 바꿔주시면 좋을것 같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵 바로 변경하도록 하겠습니다.
감사합니다.
@JoinColumn(name = "accommodationId_id") | ||
private Accommodation accommodationId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기도 오타와함께 수정할 부분이 있네요~
Accomodation을 직접 참조하고 있으므로 필드명은 accomodation으로 변경하고
@joincolumn(name = "accommodation_info_id")가 되어야할것같아요!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
넵! 알겠습니다.
감사합니다.
@OneToOne(fetch = FetchType.LAZY) | ||
@JoinColumn(name = "accommodation_id") | ||
private Accommodation accommodation; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 Accommodation과 OneToOne 관계로 맵핑되어있는 엔티티들이 AccomodationInfo, AccomodationPrice이 있네요.
여기서 의문은 Accomodation에서 AccomodationInfo와 AccomodationPrice를 어떻게 가져올것인가에요
Info와 Price쪽에 단방향으로 OneToOne을 정의하게되면, 주인엔티티인 Accomodation에서 조회할 수 있는 방법이 없어집니다. OneToOne을 어느쪽에 정의해야 원하는정보를 한번에 호출했을때 이상이 없을지 한번 검토해보면 좋을 것 같습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네 검토해보고 적용하여 다음 리뷰때 반영하도록 하겠습니다.
감사합니다!
[Android] 현재 달이 아닌 다음 달을 가져오는 이슈 해결
@yeonnseok 안녕하세요! 검봉입니다. 다시한번 감사드립니다^^ |
* feat: 달력 무한 캐러셀 우측 구현 * fix: 달력들의 초기값을 수정하여도 general하게 동작하도록 수정
* refactor : Calendar 컴포넌트 분리 Co-authored-by: JinJeon <JinJeon@users.noreply.github.com> * feat : 캘린더 슬라이더 구현 (#18) * refactor : 캘린더 스타일 지정 위치 변경 * test : slide 기능 구현 위해 테스트 코드 작성 * feat : animation으로 일회성 슬라이딩 구현 * feat : 캘린더 슬라이드 기능 구현 * refactor : 특정 간격에 대한 월, 연도를 구하는 형식으로 변경 * refactor : 연도, 월 계산 함수 통해 이벤트 함수 통합 * fix : 1월이 13월으로 나오는 버그 해결 * fix : 월 표시 문제 수정 * refactor : 스타일 컴포넌트 및 적용된 컴포넌트 이름 수정, 적용 * refactor : 연도, 월 표시 부분 리펙토링 * refactor : CalCell 부분 이름 변경 및 적용 * fix : 검색창, 모달창에 해당 월이 한 달 적게 표시되는 문제 해결 * fix : 달력 마지막 날이 토요일에 걸리는 경우 그라데이션 안되는 오류 해결 * feat : 반응형 미니바 구현 및 모달 외부 클릭 시 창 닫기 기능 구현 (#22) * feat : MiniSearchBar 컴포넌트 생성 * feat : 미니바 애니메이션 구현 * feat : 미니바 애니메이션 * fix : 미니바 position 수정 * fix : 미니바 애니메이션 수정 * feat : StyledSearchBarWrapper 로 미니바, 서치바 랩핑 * refactor : props 받아오는 것 수정 * refactor : 미니바에 context를 사용하여 정보 표시 * feat : Modal 에 Background 추가 * feat : modal 외부 클릭 시 modal 창 닫히는 기능 구현 * fix : 모달 클릭 시에도 모달이 꺼지는 문제 해결 모달 자체에 onClick * feat : Portal 을 사용하여 모달 창 닫기 기능 구현 * fix : portal 사용 시 모달 레이아웃이 깨지는 문제 해결 box-sizing: border-box; 을 추가했다. * feat : 검색 버튼 클릭 시 모달 닫기 * fix : 모달 Background 로 인한 GNB z-index 수정 * fix : 모달 Background 로 인한 GNB z-index 수정 테스트를 위한 border 삭제 * feat : 검색 후 숙소 리스트 구현 (#24) * feat : 이미지 및 데이터 추가 및 위치 이동 * feat : hotels api 추가 및 수정 * fix : 이미지, api 이동에 따른 파일 수정 * feat : Search Desc의 필터된 정보란 설정 * feat : 검색 결과 상세값 및 가격 불러오기 일부 설정 * feat : 결과창 금액란 생성 * feat : 숙소별 이미지를 불러오기 위한 api 생성 및 적용 * refactor : 페이지 수 지정 * feat : 반응형 미니바 구현 완성 (#25) * feat : 미니바 slide-in 애니메이션 추가 Co-authored-by: JinJeon <JinJeon@users.noreply.github.com> * fix : 반응형 미니바 구현 완료 검색바 외부를 클릭하면 반응형으로 검색바를 미니바로 바꾼다. * refactor : miniSearchBarIsHidden & searBarIsHidden 상태를 selectedSearchBar 상태 하나로 통합 Co-authored-by: JinJeon <JinJeon@users.noreply.github.com> * feat : 검색 결과 지도에 표시 (#26) * feat : map 생성 및 컴포넌트 분리를 위한 상태 위치 변경 * feat : 지도 영역 분리 및 데이터에 따른 지도 표시 구현 * feat : 검색 지도가 스크롤 시 고정이 유지되도록 설정 * fix : 기타 에러 사항 수정 (#27) * fix : 캘린더 hover 시 색상 변경되도록 수정 * fix : PR 내용 반영 및 수정 Co-authored-by: Serin-Kim <serin9864@gmail.com> Co-authored-by: JinJeon <JinJeon@users.noreply.github.com> Co-authored-by: Serin Kim <68533016+Serin-Kim@users.noreply.github.com>
안녕하세요 Peter 😃, Team 18 백엔드 검봉 & 타니입니다.
이번 주는 DB 설계 및 안드로이드 분들과 소통에 초점을 맞춰서 작업을 진행하려고 하고 있습니다.
이번 주 프로젝트 진행 상황
DB 요구사항 분석
📌DB 요구사항 분석
ERD 다이어그램 작성 (초안)
📌 ERD 다이어그램 작성 (초안)
숙소
-Accommodation
숙소 정보
-AccoomodationInfo
숙소 가격
-AccommodationPrice
지역
-Region
예약
-Reservation
리뷰
-Review
유저
-User
💡 궁금한 점
숙소
,숙소 정보
,숙소 가격
테이블 3개가 있습니다. 여기서 저희가 생각하기로 사실 가격도 정보라고 할 수 있겠고, 정보 테이블의 필드 또한 숙소 테이블의 필드여도 상관없는...? 즉, 숙소 테이블 하나로 테이블 3개를 다 묶을 수 있다고는 생각하고 있는데, 그렇게 된다면 숙소 테이블 자체가 너무 거대해진다고 생각해, 이렇게 3개의 테이블로 나누었습니다. 단일 테이블은 뭔가 꺼림직하기도 하고 아닌 것 같아서 나눴지만 확실한 근거가 없어 혼란스러운 상태입니다. Peter 의 의견이 궁금합니다 ..!