Skip to content

Commit

Permalink
프로젝트를 마무리 아카이빙용 최종 PR (#104)
Browse files Browse the repository at this point in the history
* [Feature/entity] entity 생성, mysql docker-compose 추가 (#1)

* feat: entity 생성

* entity mysql

Co-authored-by: sds1vrk <[email protected]>

* Feature/slam 46 - 프로젝트 공통 기능 설정 (#3)

* feat : configuration에 CORS 설정 추가

* feat : 예외처리 핸들러 구현

* feat : 커서 페이징 request, response 구현

* feat : api response 추가

* feat : validation 라이브러리 의존성 추가

* refactor : response 형식 수정 (#4)

* feat : user entity 추가 구현

* FEATURE/SLAM-45 court,reservation entity 추가 (#2)

* FEATURE/SLAM-45 court,reservation entity 추가

* 코드 리뷰 반영

Co-authored-by: sds <[email protected]>

* feat : security 설정 구축

* feat : jwt 설정 구현

* feat : 로그인 성공 시 실행되는 handler 구현

* feat : user entity, repository 보충

* feat : security config 설정

* feat : user 관련 상세 exception 구현

* feat : OAuth 관련 user service 구현

* REFACTOR Api Reponse 수정 (#6)

Co-authored-by: sds <[email protected]>

* feat : 프론트로 발급한 jwt token 보내기 기능 구현

* chore : jwt token 만료시간 연장

* feat : invalid token과 관련한 error code 및 exception 추가

* chore : db 초기화 전략 수정(create -> none)

* feat : user controller, service 클래스 생성

* refactor : security 설정 수정

* chore : '미정(선택 안함)' status 변경(UNDEFINED -> TBD)

* refactor : '숙련도'를 나타내는 class명 변경 및 적용(Skill -> Proficiency)

* refactor : @getter 추가

* feat : 사용자 추가정보 입력 api 구현

* Feature/slam 1 - OAuth2.0 카카오로 회원가입 및 로그인 구현 (#9)

* feat : user entity 추가 구현

* feat : security 설정 구축

* feat : jwt 설정 구현

* feat : 로그인 성공 시 실행되는 handler 구현

* feat : user entity, repository 보충

* feat : security config 설정

* feat : user 관련 상세 exception 구현

* feat : OAuth 관련 user service 구현

* feat : 프론트로 발급한 jwt token 보내기 기능 구현

* chore : jwt token 만료시간 연장

* feat : invalid token과 관련한 error code 및 exception 추가

* chore : db 초기화 전략 수정(create -> none)

* feat : user controller, service 클래스 생성

* refactor : security 설정 수정

* chore : 보안정보 환경변수로 변경

* refactor : @getter 추가

* refactor : dto  수정

* test : 사용자 추가정보 입력 api ControllerTest 작성

* Feature/slam 22 알람 조회하기 (#10)

* Auto stash before rebase of "origin/develop"

* feat: alarm entity 생성

* feat: alarm entity test code

* feat: alarm service code 추가

* feat: alarm dto 추가

* feat: alarm service test code

* feat: CursorRequest dto 추가

* test: entity 이름이 notifiation으로 변경되면서 없어짐.

* chore: entity 이름이 notification으로 변경되면서 수정된 내용들

* chore: convertor 추가

* chore: entity의 테이블 이름 변경

* chore: 오타 수정

* feat: 사용자 아이디를 활용하여, 알림 정보 추출하는 기능 구현(cursor 기반)

* feat: 사용자 아이디를 활용하여, 알림 정보 추출하는 기능 (cursor 기반) 테스트 코드

* feat: 사용자 아이디를 활용하여, 알림 정보 추출하는 기능 구현 controller

* feat: cursor 기반 request dto

* Feature/slam 5 - 프로필 이미지 수정 및 삭제 api (#14)

* feat : user entity 추가 구현

* feat : security 설정 구축

* feat : jwt 설정 구현

* feat : 로그인 성공 시 실행되는 handler 구현

* feat : user entity, repository 보충

* feat : security config 설정

* feat : user 관련 상세 exception 구현

* feat : OAuth 관련 user service 구현

* feat : 프론트로 발급한 jwt token 보내기 기능 구현

* chore : jwt token 만료시간 연장

* feat : invalid token과 관련한 error code 및 exception 추가

* chore : db 초기화 전략 수정(create -> none)

* feat : user controller, service 클래스 생성

* refactor : security 설정 수정

* chore : '미정(선택 안함)' status 변경(UNDEFINED -> TBD)

* refactor : '숙련도'를 나타내는 class명 변경 및 적용(Skill -> Proficiency)

* refactor : @getter 추가

* feat : 사용자 추가정보 입력 api 구현

* refactor : dto  수정

* test : 사용자 추가정보 입력 api ControllerTest 작성

* feat : 프로필 이미지 삭제 api 구현

* test : 프로필 이미지 삭제 api ControllerTest 작성

* feat : AWS S3 연동

* feat : 프로필 이미지 수정 api 구현

* test : 프로필 이미지 수정 api ControllerTest 작성

* feat : AWS 정보 읽어올 수 있도록 설정

* Feature/slam 54 - 내 정보 조회 api (#15)

* feat : 프로필 이미지 삭제 api 구현

* test : 프로필 이미지 삭제 api ControllerTest 작성

* feat : AWS S3 연동

* feat : 프로필 이미지 수정 api 구현

* test : 프로필 이미지 수정 api ControllerTest 작성

* feat : AWS 정보 읽어올 수 있도록 설정

* feat : 내 정보 조회 api 구현

* test : 내 정보 조회 api ControllerTest 작성

* fix : url  오타 수정

* Feature/slam 20 - 코트 추가하기, 예약하기  (#16)

* controller, service 추가

* userTempRepository 추가

* merge 회원가입

* 사용자에 의한 코트 추가 코드작성

* merge conflict 해결

* feature/slam-13 사용자가 농구장 추가하기

* BaseResponse 추가

* feature/slam-12 전체 코트 조회하기

* court reservation 양방향 매핑

* feature/SLAM-12, 13 추가사항 반영

* 예약하기 controller service repository 구현

* controller test 코드 작성

* test code 작성

* slam 13 사용자가 농구장 추가하기 PR 내용 반영

* user conflict 해결

* 예약 수정하기

* 예약 update, delete 코드 작성 및 테스트

* refacto : validation 추가

* token id 메소드 추가

* refactor/userToken 적용

* feature/court dummy data 추가

Co-authored-by: sds <[email protected]>

* Delete aws.yml

* Delete application-dev.yml

* Delete test.properties

* Feature/alam 24 - notification 오류 수정  (#18)

* fix : 버전에 맞게 수정

* fix : 버전에 맞게 수정

* fix : token 사용 및 save 기능 삭제

* fix : 파일 삭제

* fix : ignore 추가

* fix : 코드 통합 후 에러 해결

* hotfix / repository 오류 해결

* hotfix / conflict 해결

* [급하게 처리합니다] Feaurte/slam 52 - 앱 실행시 기본 정보 제공 api (#22)

* refactor : 기존 api url 및 메서드명 변경

* feat : 회원 프로필 정보 조회 api 구현

* refactor : 기존 PostMapping API를 PutMapping API로 변경

* test : 회원 프로필 정보 조회 api ControllerTest 작성

* feat : 앱 실행 시 기본 정보 제공 api 구현

* fix : @getter가 빠져서 발생한 오류 해결

* refactor : notifications null이 아닌 빈 배열로 제공

* feat : web socket 임시 기능 추가 (#24)

* Feature/slam 6 - 회원 프로필 조회 api (#21)

* refactor : 기존 api url 및 메서드명 변경

* feat : 회원 프로필 정보 조회 api 구현

* refactor : 기존 PostMapping API를 PutMapping API로 변경

* test : 회원 프로필 정보 조회 api ControllerTest 작성

* Feature/slam 57 - notification 도메인 수정 (프론트 의견 반영) (#25)

* fix: 메시지 포멧 삭제

* fix: 불필요 코드 삭제

* feat: dto 생성

* feat: response dto 생성

* feat: entity 수정 및 추가

* fix: 메시지 포멧 삭제

* fix: 불필요 코드 삭제

* feat: dto 생성

* feat: response dto 생성

* feat: entity 수정 및 추가

* fix : entity 유효성 검사 추가

* fix : entity 유효성 검사 추가

* feat : insert select 추가

* fix : dto 세부적 코드

* fix : 주석 처리

* fix : convertor 수정

* fix : notification repository save 추가

* fix : dto created, updated 추가

* fix : convertor로 처리하는 부분 추가

* feat : created 정렬

* feat : test 작성 중, 브러치 이동을 위해 커밋

* fix : userId 추가

* feat : 테스트 코드 작성중

* chore : contents로 변수명 변경

* feat : 프로트 의견 반영, notification 도메인 수정 완료

* fix : notification dto 위치 변경 적용 (#26)

* Feature/slam 7 - 팔로워 목록 무한스크롤로 조회 api (#27)

* chore : json 형태로 바꿔주는 mapper클래스 생성 및 적용

* refactor : 무한 스크롤을 위한 request, response 수정

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* test : 팔로워 목록 무한 스크롤로 조회 api ControllerTest 작성

* fix : NotificationServiceTest 에러 발생 -> 주석처리

* Feature/slam 8 - 팔로잉 목록 무한스크롤로 조회 api (#28)

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* test : 팔로잉 목록 무한 스크롤로 조회 api ControllerTest 작성

* Fix/cors error - CORS Error 해결 (#30)

* chore : json 형태로 바꿔주는 mapper클래스 생성 및 적용

* refactor : 무한 스크롤을 위한 request, response 수정

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* test : 팔로워 목록 무한 스크롤로 조회 api ControllerTest 작성

* fix : NotificationServiceTest 에러 발생 -> 주석처리

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* test : 팔로잉 목록 무한 스크롤로 조회 api ControllerTest 작성

* feat : cors 해결을 위한 필터 생성 및 적용

* feat : JwtAuthenticationFilter 수정

* refactor : api 접근 권한은 USER, ADMIN으로 제한

* Feature/slam 58 - base64로 이미지 업로드 및 테스트 코드 작성 (#23)

* refactor : 불필요한 로그 삭제

* feature : s3 미디어 url 적용

* feature : image test code 작성

Co-authored-by: sds <[email protected]>

* Feature/slam 52 - 프론트와 백 웹소켓 통신 확인을 위한 더미데이터 입력 (#34)

* feat : 회원 프로필 정보 조회 api 구현

* feat : 앱 실행 시 기본 정보 제공 api 구현

* test : 앱 실행시 기본 정보 제공 api ControllerTest 작성

* feat :  websocket  테스트를 위한 notification dummy data 입력

* Feature/slam 15 - 즐겨찾기 코드 작성 (#29)

* refactor : 불필요한 로그 삭제

* feature : s3 미디어 url 적용

* feature : image test code 작성

* favorite 추가 조회 삭제 기능

* feature : favorite 추가 조회 삭제 test code 작성

Co-authored-by: sds <[email protected]>

* feat : json 이름명 camel case로 고정

* refactor : 실제 이미지 값 적용

* Feature/slam 9 - 팔로우 맺기, 취소하기 기능 구현 (#31)

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* feat : Follow와 관련한 구체적인 에러코드, 예외클래스 생성 및 적용

* feat :  팔로우 맺기, 취소하기 기능 구현

* test : 팔로우 맺기, 취소하기 기능 테스트

* Feature/slam 61 - 농구장 특정 날짜의 예약 전체조회 (#32)

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* refactor : 불필요한 로그 삭제

* feature : s3 미디어 url 적용

* feature : image test code 작성

* favorite 추가 조회 삭제 기능

* feature : favorite 추가 조회 삭제 test code 작성

* feature : 날짜, courtId로 예약된 코트 조회

* refactor : test Code Document 수정

Co-authored-by: yekyeong <[email protected]>
Co-authored-by: sds <[email protected]>

* Feature/slam 29 - 관리자가 사용자가 요청한 농구장 승인 또는 취소하기 api (#33)

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* refactor : insert 메서드 위치 변경(CourtService -> NewCourtService)

* fix : import에 UserNotFoundException가 빠진 에러 해결

* feat : new court 관련 구체적인 에러코드, 예외클래스 작성 및 적용

* feat : 관리자가 사용자가 추가요청한 농구장 승인, 취소하기 api 구현

* test : 관리자가 사용자가 추가요청한 농구장 승인, 취소하기 api ControllerTest 작성

* Feature/slam 52 - 앱 실행 시 기본 제공 정보(사용자 정보, 알람정보) api 완성 (#36)

* feat : 회원 프로필 정보 조회 api 구현

* feat : 앱 실행 시 기본 정보 제공 api 구현

* feat : 앱 실행시 기본 정보 제공 api 완성

* refactor : response json에서 boolean의 is가 생략되는 문제 해결

* test : 앱 실행시 기본 제공 api ControllerTest 작성 완료

* Fix/merge conflict (#37)

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* refactor : 불필요한 로그 삭제

* feature : s3 미디어 url 적용

* feature : image test code 작성

* favorite 추가 조회 삭제 기능

* feature : favorite 추가 조회 삭제 test code 작성

* feature : 날짜, courtId로 예약된 코트 조회

* refactor : test Code Document 수정

* feature : 날짜, boundary에 의한 예약된 코트 검색

Co-authored-by: yekyeong <[email protected]>
Co-authored-by: sds <[email protected]>

* Fix/rebase conflict - Rebase 충돌 해결 (#38)

* feat : 팔로워 목록 무한 스크롤로 조회 api 구현

* feat : 팔로잉 목록 무한 스크롤로 조회 api 구현

* refactor : 불필요한 로그 삭제

* feature : s3 미디어 url 적용

* feature : image test code 작성

* favorite 추가 조회 삭제 기능

* feature : favorite 추가 조회 삭제 test code 작성

* feature : 날짜, courtId로 예약된 코트 조회

* refactor : test Code Document 수정

* feature : 날짜, boundary에 의한 예약된 코트 검색

* fix : reabase Conflict 해결

Co-authored-by: yekyeong <[email protected]>
Co-authored-by: sds <[email protected]>

* fix: 오타 수정 (#39)

* fix : 잘못된 이름으로 만들어진 파일 제거

* Feature/slam 60 - 공지 도메인 (#40)

* feat: Notification 추가 및 삭제 기능 추가

* fix: 오타 수정

* fix: 예약 도메인 쪽 주석 처리

* feat: header에 token이 없을 때 사용하는 예외 코드 추가

* fix: /추가

* fix: destination prefix 수정

* fix: cors 에러 해결

* fix: follow cancel 기능 수정

* fix: court entity에서 reservation entity 사용 ( booker 추출)

* fix: 삭제된 비즈니스 로직 추가 getTop10Notification

* feat: 팔로우 도메인 기능 중 Follow unfollow 기능 사용 (#41)

* Feature/stam 26 - chat 비즈니스 로직 추가 (#44)

* fix: 불필요 코드 삭제 및 entity 이름 수정

* feat: entity 추가

* feat: chat 도메인의 repository 추가

* feat: convertor 추가

* feat: repository 추가

* feat: dto 추가

* feat: service 추가

* feat: entity 추가

* feat: 채팅 대환 내용 추출 기능 (무한스크롤 적용)

* feat: invaildChatType exception 추가

* feat: chat type 추가 (enum)

* feat: 채팅 대화 저장 및 socket 전송 기능 추가

* feat: 채팅 확성기 정보 전송 기능 추가

* feat: 채팅 룸 목록 조회 기능 추가

* feat: 채팅방 생성 및 사용자의 채팅방 최초 입장 기능 추가

* feat: 브런치 이동으로 잠시 저장

* fix: delete 기능 추가

* fix: 정렬순서를 최신순으로 설정

* fix: json 명 수정 ChatContentsResponse

* fix: chat content type 추가

* fix: Response 수정 (프론트 의견 반영)

* fix: userChatRoom 삭제 기능

* fix: entity 유효성 검사 수정

* feat chat room mapping 코드 테스트 완료

* feat: chat content 비즈니스로직 코드 테스트 완료

* Fix/slam 98 - cursorPageRequest setter 삭제  (#45)

* fix: 생성자 주입으로 변경 , setter 주입 삭제로 인한 수정

* fix: 생성자 주입으로 변경 , setter 주입 삭제로 인한 수정

* Feature/slam 28 - 사용자가 추가한 농구장 조회 api (#42)

* feat : new  court의 status에 관한 구체적인 에러코드 및 예외클래스 작성 및 적용

* feat : 사용자가 추가한 농구장 조회 api 구현

* test : 사용자가 추가한 농구장 조회 api ControllerTest 작성

* refactor : new court 승인 후 court에 정보 저장 기능 추가

* refactor : 정식 농구장으로 등록 시 채팅방 생성될 수 있도록 기능 추가

* chore : lastId값 null 허용

리뷰 참고 -> prgrms-web-devcourse/slam-server#42 (comment)

* fix : redirect_uri를 동적으로 설정할 수 있게 수정 (#46)

* feat: chat web socket 구현 (#47)

* Feature/slam 18 - upcoming 기능 개발 (#43)

* hotfix/urlFix

* fix : corsFilter에 PATCH 추가

* feat : reservation upcoming 기능 개발

* feat : 즐겨찾기에 courtName 추가 or  TestCode 주석

Co-authored-by: sds <[email protected]>

* Feature/slam 70 - refactor : PUT, PATCH status code를 202(ACCEPTED)로 수정 (#48)

* Feature/slam 71 - response에 팔로우 여부 추가 (#49)

* feat : 같은 사용자가 입력값으로 들어오지 못하도록 에러코드 및 예외클래스 생성

* feat : response에 팔로우여부를 추가 및 기능 수정

* test : response 추가에 따른 테스트 코드 수정

* Fix/slam 120 팔로우 로직 수정 (뒤바뀜) (#51)

* fix : 팔로우 로직 수정 (뒤바뀜)

* fix : 변수명 수정

* fix : 팔로우 수, 팔로잉 수 뒤바뀜 오류 해결

* fix : 팔로우 수, 팔로잉 수 뒤바뀜 오류 해결

* Fix/slam 72 (#52)

* feat : courtRepo, Reservation Repo 분리

* fix : 바운더리, 날짜로 코트 조회 코드 수정

Co-authored-by: sds <[email protected]>

* fix : 삭제 오류 수정 (#53)

* Fix/followDeleteError - @Modifying을 붙여서 에러 해결 (#54)

* fix : followcacel 삭제 기능 주석 처리(unfollow 메서드와 함께 사용시 오류남) (#55)

* fix : response 수정 및 테스트 코드 (#56)

* Fix/slam 124 - notification followcancel 이슈 해결 (#57)

* fix : 원복 isDeleted로 확인하는 로직 삭제

* fix : test 코드 주석 처리

* fix : 주석 제거

* Feature/slam 62 - 예약 상세 조회 (토글버튼) 기능 완료 (#50)

* feat: courtName 추가, Court, Reservation Test Code 주석

* feat : court 생성하면서 플로라 채팅 DB에 더미데이터 넣기

* feat : 예약 상세 조회 (토글버튼) 기능 완료

* fix : 에러 해결

Co-authored-by: sds <[email protected]>

* Feature/slam 74 - 사용자에 의해 지난 예약 조회 (#58)

* fix : pathVariable 수정

* feat : 만료된 예약장 조회하기 (무한 스크롤)

* fix : 불필요한 주석 제거

* fix : String to dateFormatter

Co-authored-by: sds <[email protected]>

* fix : 지난 예약 목록 조회 코드 수정 (#59)

Co-authored-by: sds <[email protected]>

* Fix/expried reservation (#60)

* fix : 지난 예약 목록 조회 코드 수정

* fix : reservationCount 추가

Co-authored-by: sds <[email protected]>

* Feature/slam 73 - api에 접근 권한 설정 추가 (#61)

* feat : 불필요한 api 삭제

* feat : 익명 사용자가 일부 api에 접근할 수 있도록 설정 수정

* Fix/toggle fix (#62)

* fix : 토글버튼 reservations 못찾는 쿼리 변경

* fix : reservationCount 수 수정

Co-authored-by: sds <[email protected]>

* Fix/toggle fix (#63)

* fix : 토글버튼 reservations 못찾는 쿼리 변경

* fix : reservationCount 수 수정

* fix : boundary로 유저 조회 (group by로 중복 제거)

* fix : 예약된 시간대로 reservationCount 주기

Co-authored-by: sds <[email protected]>

* fix : toggle follow 수정 (#64)

Co-authored-by: sds <[email protected]>

* Feature/slam 77 - cors allowed origin 환경변수 설정 (#67)

* feat : cors allowed origin 환경변수 설정

* chore : 불필요한 코드 제거

* feat : cors allowed origins 여러개로 수정

* Feature/slam 76 (#68)

* fix : image null 값 허용

* feat : dummy data 엑셀로 추가

* fix : .ignore 엑셀 추가

* fix : 엑셀 경로 수정

* fix : classpath 경로 수정

Co-authored-by: sds <[email protected]>

* fix : dummyCourt Insert 쿼리 수정 및 젠킨스에 엑셀 파일 추가 (#69)

Co-authored-by: sds <[email protected]>

* Feature/slam 76 - 기존 빌드로 복구 (#70)

* fix : image null 값 허용

* feat : dummy data 엑셀로 추가

* fix : .ignore 엑셀 추가

* fix : 엑셀 경로 수정

* fix : classpath 경로 수정

Co-authored-by: sds <[email protected]>

* hotfix : 긴급 에러 처리 (기존 엑셀 저장 기능 주석) (#71)

Co-authored-by: sds <[email protected]>

* Test/test code conflix (#72)

* hotfix : 긴급 에러 처리 (기존 엑셀 저장 기능 주석)

* hotfix : 사용자에 의한 reservation Count 수정

* fix : test Code (Court, Reservation 테스트 코드 수정) 및 @manytoone 테스트 casecade 적용

* fix : 더미 데이터 위도, 경도 위치 수정

* hotfix : 긴급 에러 처리 (기존 엑셀 저장 기능 주석)

Co-authored-by: sds <[email protected]>

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결 (#73)

* Fix/dumy data 1 :  해결 시도 1 (#74)

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결 시도 1

* Fix/dumy data 1 : 해결시도2 (#75)

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결 시도 1

* fix : 더미 데이터 엑셀파일로 읽고 저장 이슈 해결 시도 2

* fix : 더미 농구장 이름으로 수정

* hotfix : 더미 농구장 이름으로 수정

* fix : 더미 데이터 위도, 경도 위치 수정 (#76)

Co-authored-by: sds <[email protected]>

* Fix/login 100 - 관리자 권한 부여를 위한 이메일 제한 (#77)

* fix : email 로 확인하고 admin role 적용

* fix : 팀원들의 이메일 적용

Co-authored-by: yunyun <[email protected]>

* fix : 더미 데이터 위도, 경도 위치 수정 (#78)

Co-authored-by: sds <[email protected]>

* Feature/slam 201 : notification 및 court chatRoom dummy 추가 (#79)

* feat : court dumy에 매칭되는 court chat room

* feat : end point 수정

* feat : notification 및 court chatRoom dummy 저장

* hotfix : texture null 허용

* fix : data에 id 넣기 (프론트 요청 사항 적용) (#80)

* Fix/slam 124 - dummy 이슈 해결 (#81)

* fix : data에 id 넣기 (프론트 요청 사항 적용)

* fix : dummy 이슈 해결

* Fix/slam 124 - convertor 수정 (#82)

* fix : data에 id 넣기 (프론트 요청 사항 적용)

* fix : dummy 이슈 해결

* fix : convertor 수정

* hotfix : follow 전송 url

* hotfix : follow 전송 url 롤백

* hotfix : notification 저장 사용자 변경

* hotfix : checkCreatorId 추가 해서 삭제 기능 구현

* hotfix : checkCreatorId를 notification_index에 추가 해서 삭제 기능 구현

* hotfix : delete 기능에 Transactional 사용

* hotfix : CascadeType.REMOVE 적용

* hotfix : follow @UniqueConstraint 적용

* hotfix : followNotificationRepository 함께 삭제

* hotfix : 삭제 테이블 위치 변경 (해결)

* hotfix : 다가올 예약 상세보기 쿼리 오류 해결

* hotfix : followId 중복 제거 (#84)

Co-authored-by: sds1vrk <[email protected]>

* hotfix : jwt 발급 시 email도 포함시키도록 수정 (#85)

* hotfix : dump query 주석 처리

* Update README.md

* Test/follow hotfix  - toggle 버튼 follow N명 -> 1명으로 수정 (#86)

* hotfix : followId 중복 제거

* fix : 토글버튼 중복된 아이디 제거

Co-authored-by: sds1vrk <[email protected]>

* Test/follow hotfix (#87)

* hotfix : followId 중복 제거

* fix : 토글버튼 중복된 아이디 제거

* fix : follow 부분 수정

Co-authored-by: sds1vrk <[email protected]>

* Update README.md

* hotfix : url 변경 (notification 도메인)

* feature/management 97 - court, newCourt entity 수정 (#98)

* refactor : Court, NewCourt entity 필드 추가

* refactor : response 변수명 수정

* feat : 사용자가 추가한 농구장 승인/거절 시 관리자 정보를 같이 가져오도록 기능 추가

* fix : controller 코드에 맞게 테스트 코드 수정

* Feature/slam 63 - s3 upload 이슈 해결 (#83)

* feat : s3 이미지 업로드 방식을 base64가 아니라 multipartfile로 변경

* chore : 불필요한 dto 삭제

* fix : 불필요한 import 삭제

* fix : 테스트 코드 보류

* refactor/user 102 - 내 프로필 정보 조회 api response 수정 (#105)

* refactor : response 수정

* refactor : DefaultUserDto를 만들어 response에 적용

* refactor : response 수정

* refactor : DefaultUserDto 적용

* test : api response 수정에 맞게 테스트코드 수정

* feat : swagger 적용을 위한 설정 추가 (#108)

* refactor/user 103 - 내 정보 수정(추가 입력) api 수정 (#109)

* refactor : DefaultUserDto 적용하여 response 수정

* test : api 수정에 맞게 테스트코드 수정

* feat : swagger 설정 추가

* fix : id 값을 number에서 string으로 통일

* refactor/user 106 - 내 프로필 이미지 수정 및 삭제 api 수정 (#110)

* refactor : request, response 수정

* test : api 수정에 맞게 테스트코드 수정

* chore : 괄호 파뜨림

* refactor/follow 111 - 팔로우 도메인 api(팔로우 목록 조회, 팔로잉 목록 조회 등) 수정 (#113)

* refactor : follow 도메인 관련 api response 수정

* test : api 수정에 맞게 테스트코드 수정

* chore : 불필요한 import 삭제

* Create maven.yml

* feature/management 26 - 사용자가 추가 신청한 농구장 등록 승인/거부 api 수정 (#28)

* feat : 농구장 승인/거절 api에 관리자 정보 추가

* test : api 수정에 따라 테스트코드 변경

* fix/user 32 - 프로필 이미지 관련 API response 속 id의 자료형 변경 (#33)

* [CICD] Git Action 적용 (#36)

* Create application.yaml

* Create aws.yaml

* Create app.properties

* fix: 변수명 수정

* fix: 변수명 수정

* fix: 변수명 수정

* feat: branch 변경

* fix: 환경변수 사용

* fix: 환경변수로 수정

* fix: 환경변수로 수정

* feat: 환경변수 선언

* fix: 잘못된 형식 수정

* fix: 환경변수 선언 위치 변경

* fix: 오타 수정

* fix: 오타 수정

* fix: test skip

* feat: docker build

* build: docker file 추가

* fix: 환경변수 선언 삭제

* fix: 변수명 변경

* feat: health check

* [Notification] entity 수정 및 배포된 데이터 베이스 수정  (#35)

* refactor: follow entity 삭제

* refactor: LoudspeakerNotification에서 Loudspeaker로 엔터티 이름 변경

* refactor: Notification entity로 이름 변경

* feat: 논의 후, 변경된 entity 형식으로 수정

* feat: eneity와 dto 유효성 검사 공통 문구 추가

* feat: dto 새로 추가 및 불표한 dto 삭제

* feat: 새로 수정된 dto 에 맞춰 수정

* feat: 불필요한 repository 삭제

* feat: loudspeaker entity 수정된 컬럼에 맞게 수정

* feat: entity 이름 변경

* feat: 컬럼 수정으로 쿼리 변경

* feat: 수정된 dto와 entity 에 맞게 수정

- 공지 reqeust 수정
- 공지 관련 controler 수정
- convertor 수정

* feat: 공지 내용에 end time와 start time 의 타입 변경와 정보 추가

* test: 공지 내용에 end time와 start time 의 타입 변경와 정보 추

* fix: 공지 도메인의 dto 변경으로 수정됨

* test: 공지의 end time 추가, start time 타입 변경

* feat: notification domain id 를 uuid 로 변경

- id를 uuid 로 변경
- loudspeaker entity 클래스명 변경

* feat: notification domain id 를 uuid 로 변경

- id를 uuid 로 변경
- loudspeaker entity 클래스명 변경

* feat: api 설명 추가

Co-authored-by: coloveding <[email protected]>

* feat: deploy 추가

* fix: 명령어 수정

* fix: 배포 branch 이름 변경

Co-authored-by: coloveding <[email protected]>

* hotifx: hibernate auto 설정 값 변경 ( create -> none)

* refactor 카카오에서 받아온 프로필이미지 링크 https로 변환 (#39)

* Hotfix: follow 알람 메시지 수정

- follow entity의 user의 패치타입을 eager로 변경

* fix/user 40 - 존재하지 않는 유저페이지에 접근 시 구체적인 에러메세지 생성 (#41)

* fix : 구체적인 에러메세지로 응답할 수 있도록 수정

* chore : swagger에 error response에 대한 정보 명시

* feature/management 29 - 처리 대기 중 또는 완료된 새 농구장 목록 조회 api (#42)

* feat : 처리 대기중인 또는 완료된 농구장 목록 조회 api 분리

- /newCourts/ready
- /newCourts/done

* fix : 새로 바뀐 NewCourt entity 설계에 맞게 농구장 추가 api, 관련 request, response 수정

* test : 새 농구장 추가 api 테스트코드 수정

* test : 사용자가 추가한 농구장 중 처리 대기 중인 농구장 목록 조회 api 테스트코트 작성

* chore : response 클래스명 변경

* refactor : 처리완료된 새 농구장 api의 response에 관리자(supervisor) 정보 추가

* test : 처리완료된 농구장 목록 조회 api 테스트코드 작성

* chore : swagger 관련 정보 추가

* fix/notification 43 무한 스크롤 lastId 값 변경 (#44)

* fix: lastId 을 string 타입으로 변경

* fix: lastId string으로 변경후 버그 수정

* fix: 불필요한 else 처리 삭제

* docs/common 53 - 프로젝트 내에 있는 불필요한 파일 삭제 (#54)

Co-authored-by: coloveding <[email protected]>

* docs(README.md): client git repo url 최신화 (#50)

* fix/court 45 - response의 id type(Long -> String) 변환 (#49)

* chore: 불필요 파일 삭제

* fix : 농구장 상세정보 불러오기 api response 수정

* chore : swagger에 api 설명 정보 추가

* fix : 날짜, 시간, 바운더리로 농구장 검색 api response 수정

* refactor : 특정 날짜의 농구장 예약 전체조회 api를 ReservationController에 위임

* refactor : 농구장 상세정보 불러오기 api url 변경

* test : 농구장 상세정보 불러오기 api 테스트코드 작성

* test : 날짜, 시간, 바운더리로 농구장 검색 api 테스트코드 작성

* chore : 불필요한 클래스, 코드, 주석 제거 및 코드 정렬

Co-authored-by: coloveding <[email protected]>

* Update application.yaml

* fix/favorite 55 - response의 id type을 Long -> String으로 변환 (#56)

* chore : 변수명 오타 수정

updateAt -> updatedAt

* fix : 즐겨찾기 추가 api response 수정

* test : 즐겨찾기 추가 api 테스트코드 작성

* chore : swagger 정보 추가

* refactor : (court_id, user_id) 중복 저장 불가능하게 제한

* fix : 즐겨찾기 조회 api 수정

- 즐겨찾기 정보 받아올 때 createdAt 내림차순(desc)으로 받아오기
- api response 수정

* test : 즐겨찾기 조회 api 테스트코드 작성

* chore : swagger 정보 추가

* feat : 즐겨찾기가 없을 때 발생하는 구체적인 에러클래스 생성

* fix : 즐겨찾기 삭제(취소) api response 삭제

* test : 즐겨찾기 삭제(취소) api 테스트코드 작성

* chore : swagger 정보 추가

* chore : 코드 포맷팅

* feat/common 37 - swagger authorization button 추가

Co-authored-by: coloveding <[email protected]>

* feat/notification 47 웹소켓으로 받은 요청을 restapi로 받기 (swagger 내용 추가) (#46)

* fix: lastId 을 string 타입으로 변경

* fix: lastId string으로 변경후 버그 수정

* fix: 불필요한 else 처리 삭제

* feat: websocket -> restapi로 요청받기 (스웨거 구체적으로 내용 추가하는 것 포함)

* fix: 불필요코드 삭제

* fix: 예외처리 구체화

* fix: notification websocket controler 삭제

* hotfix: chat 도메인 UUID 적용 전으로 수정

* build: docker build --no-cache 추가

* fix/reservation 57 - response의 id type(Long -> String) 변환 (#58)

* refactor : 예약 시간에 관한 validation 추가

예약 시작시간이 예약 종료시간보다 미래일 수 없다는 validation 추가

* feat : 이미 존재하는 예약에 관한 구체적인 예외클래스 생성

* fix : 예약 추가 api response 변경 및 중복으로 예약 추가 제한

* test : 예약 추가 api 테스트코드 작성

* chore : swagger 문서 정보 추가

* fix : 오타(updateAt -> updatedAt) 수정

* fix : 예약 수정 api response 변경 및 수정 시 유저 권한 예외 추가

* fix : 다가올 예약목록 조회 api response 수정 및 ListResponse 생성, 적용

* fix : 지난 예약목록 조회  api response 수정

* fix : 예약 상세보기 api response 수정

* fix : 특정 날짜의 농구장 예약 전체조회 api response 수정

* refactor : 프로필 이미지 삭제 api 응답코드(204) 수정

* refactor : 프로필 이미지 수정 api response 수정

* chore : 불필요한 파일 제거

* refactor : response class명 수정

* refactor : 내 프로필 수정(추가 입력) api response 수정

* refactor : follow 도메인 api response 전부 id의 type String으로 변경

* refactor : 즐겨찾기 목록 조회 api response를 contents에 감싸서 응답할 수 있도록 수정

* chore : 모든 도메인 테스트코드 주석처리(todo. 테스트코드 새로 작성)

* refactor : 유저 프로필 조회 api의 court dto 수정

* fix : swagger 3.0버전을 위한 dependency 추가

* chore : 불필요한 파일 제거

* refactor : dto의 불필요한 필드 삭제 및 수정

* chore : swagger 문서에 명시할 정보 추가

* hotfix : swagger 이전 버전으로 되돌림(ver 3.0.0 오류 확인)

* hotfix : NullPointerException 에러 해결

* fix/common-59 - swagger 버전 3.0.0 으로 변경 (#60)

Co-authored-by: coloveding <[email protected]>

* fix/common 61 - swagger version 3.0으로 변경 버그 수정 (#62)

Co-authored-by: coloveding <[email protected]>

* refactor/new court 66 - api response 구조 변경 (#67)

* refactor : api response 구조 수정

* chore : 불필요한 파일 제거

* refactor/common 34 - 어노테이션을 사용해서 쉽게 사용자 id정보를 불러올 수 있도록 수정 (#68)

* feat : 사용자 id를 불러오는 커스텀 어노테이션 생성 및 적용

* refactor : reservation 도메인 @userid 적용

* refactor : favorite 도메인 @userid 적용

* refactor : court 도메인 @userid 적용

* refactor : notification 도메인 @userid 적용

* refactor : chat 도메인 @userid 적용

* chore : 불필요한 파일 제거

* refactor : management 도메인 @userid 적용

* refactor : user 도메인 @userid 적용

* Revert "refactor/common 34 - 어노테이션을 사용해서 쉽게 사용자 id정보를 불러올 수 있도록 수정 (#68)"

This reverts commit e1c30aa.

* fix/court 75 - swagger문서에 response값이 제대로 표시되지 않는 에러 해결 (#76)

* fix/reservation 78 - proxy상태일 때 내부 상태값에 접근했을 때 발생하는 에러 해결 (#79)

* fix : fetch join 사용

* chore : 코드 재정렬

* fix/user 73 - user 이메일 수집 철회 (#80)

* fix : 유저 이메일 수집 철회

* fix : 유저 관련 response에서 email값 삭제

* fix : 카카오 로그인 시 동의항목에서 email값 제거

* Revert "fix/user 73 - user 이메일 수집 철회 (#80)" (#81)

This reverts commit 3ef2aa3.

* fix/reservation 82 - 지난 예약 조회 시 500에러(proxy 초기화 문제) 수정 (#83)

* Revert "Revert "fix/user 73 - user 이메일 수집 철회 (#80)" (#81)" (#86)

This reverts commit a05d00a.

* fix 운영배포로 인해 강제 동기화 되었던 부분 수정

* refactor/reservation 88 - 이미 저장된 예약 에러 해결 (#89)

* chore : dummy court와 관련한 불필요한 파일, 코드 삭제

* refactor : 유저가 동일한 시간에 기존 예약이 존재한다면, 예약을 새롭게 추가할 수 없도록 제한

* refactor/reservation 90 - 예약 관련 시간 utc로 통일 (#91)

* refactor : request 속 불필요한 field값 삭제

* refactor : response 속 예약 관련 시간 LocalDateTime에서 Instant로 바꾸기

* refactor : 예약 추가/수정 시 utc 시간으로 제할할 수 있도록 수정

* refactor/common 34 - 어노테이션을 사용해서 쉽게 사용자 id정보를 불러올 수 있도록 수정 (#92)

* feat : 사용자 id를 불러오는 커스텀 어노테이션 생성 및 적용

* refactor : reservation 도메인 @userid 적용

* refactor : user 도메인 @userid 적용

* refactor : notification 도메인 @userid 적용

* refactor : management 도메인 @userid 적용

* refactor : favorite 도메인 @userid 적용

* refactor : court 도메인 @userid 적용

* chore : 불필요한 파일 제거

* refactor : chat 도메인 @userid 적용

* Revert "refactor/common 34 - 어노테이션을 사용해서 쉽게 사용자 id정보를 불러올 수 있도록 수정 (#92)"

This reverts commit e8105cc.

* refactor/common 깃액션 트리거 조건에서 request push 삭제

* refactor/notification 93 - 시간 정보를 Instant 객체에 담아 처리 (#94)

* refactor/notification-93 - 시간 정보를 Instant 객체에 담아 처리

* fix: 라우터 정보의 시작시간을 시작 날짜로 변경

- utc 로 받기 떄문에 추후 존으 받아서 변경 필요

* fix : 변경된 API URL에 맞게 security 권한설정 변경

* refactor/common 97 - 모든 도메인 createdAt, updatedAt utc시간으로 통일 (#98)

* refactor : court 관련 dto 시간 관련 필드값 utc로 통일

* fix : 불필요한 파라미터 제거

* refactor : favorite 관련 dto 시간 관련 필드값 utc로 통일

createdAt, updatedAt

* refactor : follow 관련 dto 시간 관련 필드값 utc로 통일

* refactor : reservation 관련 dto 시간 관련 필드값 utc로 통일

createdAt, updatedAt

* refactor : user 관련 dto 시간 관련 필드값 utc로 통일

* refactor/reservation 101 - 다가올 예약, 지난 예약 조회 시 최신순 정렬 (#102)

* feat : 예약조회용 page request, response 생성

* refactor : 다가올 예약, 지난 예약 조회 시 최신순으로 가져올 수 있도록 기능수정

* build: upgrade git action version

---------

Co-authored-by: yun <[email protected]>
Co-authored-by: sds1vrk <[email protected]>
Co-authored-by: SEO DONGSUNG <[email protected]>
Co-authored-by: sds <[email protected]>
Co-authored-by: sds <[email protected]>
Co-authored-by: yunyun <[email protected]>
Co-authored-by: coloveding <[email protected]>
Co-authored-by: Jonghyeon Ko <[email protected]>
  • Loading branch information
9 people authored Aug 14, 2023
1 parent 0ae0f95 commit 9882ca0
Show file tree
Hide file tree
Showing 30 changed files with 232 additions and 204 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
Expand Down Expand Up @@ -47,6 +47,6 @@ jobs:
envs: GITHUB_SHA
script: |
sudo docker pull ${{ secrets.DOCKER_USERNAME }}/backend:${GITHUB_SHA::7}
sudo docker tag ${{ secrets.DOCKER_USERNAME }}/backend:${GITHUB_SHA::7} backend-prod
sudo docker service update slam-prod --image backend-prod:latest --force
sudo docker tag ${{ secrets.DOCKER_USERNAME }}/backend:${GITHUB_SHA::7} backend
sudo docker service update slam-dev --image backend:latest --force
5 changes: 3 additions & 2 deletions src/main/java/org/slams/server/common/api/BaseResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.Instant;
import java.time.LocalDateTime;

@Getter
@AllArgsConstructor
public abstract class BaseResponse {

private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private Instant createdAt;
private Instant updatedAt;

}

Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ public class CursorPageRequest {
public Long getLastIdParedForLong() {
return lastId == null ? null : Long.parseLong(lastId);
}

}
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
package org.slams.server.common.api;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.time.LocalDateTime;

@AllArgsConstructor
@Getter
public class CursorPageResponse<T> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import org.slams.server.court.entity.Court;
import org.slams.server.court.entity.Texture;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.ZoneOffset;

@Getter
public class CourtDetailResponse extends BaseResponse {
Expand All @@ -19,9 +20,9 @@ public class CourtDetailResponse extends BaseResponse {
private Texture texture;
private Long reservationMaxCount;

public CourtDetailResponse(String id, String name, double latitude, double longitude,
String image, int basketCount, Texture texture,
LocalDateTime createdAt, LocalDateTime updatedAt, Long reservationMaxCount) {
public CourtDetailResponse(Instant createdAt, Instant updatedAt,
String id, String name, double latitude, double longitude,
String image, int basketCount, Texture texture, Long reservationMaxCount) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
Expand All @@ -34,8 +35,9 @@ public CourtDetailResponse(String id, String name, double latitude, double longi
}

public static CourtDetailResponse toResponse(Court court, Long reservationMaxCount) {
return new CourtDetailResponse(court.getId().toString(), court.getName(), court.getLatitude(), court.getLongitude(),
court.getImage(), court.getBasketCount(), court.getTexture(), court.getCreatedAt(), court.getUpdatedAt(), reservationMaxCount);
return new CourtDetailResponse(court.getCreatedAt().toInstant(ZoneOffset.UTC), court.getUpdatedAt().toInstant(ZoneOffset.UTC),
court.getId().toString(), court.getName(), court.getLatitude(), court.getLongitude(),
court.getImage(), court.getBasketCount(), court.getTexture(), reservationMaxCount);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
import org.slams.server.common.api.BaseResponse;
import org.slams.server.court.entity.Court;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.ZoneOffset;

@Getter
public class CourtInMapDto extends BaseResponse {
Expand All @@ -14,7 +15,7 @@ public class CourtInMapDto extends BaseResponse {
private double latitude;
private double longitude;

private CourtInMapDto(String id, String name, double latitude, double longitude, LocalDateTime createdAt, LocalDateTime updatedAt) {
private CourtInMapDto(Instant createdAt, Instant updatedAt, String id, String name, double latitude, double longitude) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
Expand All @@ -23,8 +24,8 @@ private CourtInMapDto(String id, String name, double latitude, double longitude,
}

public static CourtInMapDto toDto(Court court) {
return new CourtInMapDto(court.getId().toString(), court.getName(), court.getLatitude(), court.getLongitude(),
court.getCreatedAt(), court.getUpdatedAt());
return new CourtInMapDto(court.getCreatedAt().toInstant(ZoneOffset.UTC), court.getUpdatedAt().toInstant(ZoneOffset.UTC),
court.getId().toString(), court.getName(), court.getLatitude(), court.getLongitude());
}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package org.slams.server.court.dto.response;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.slams.server.common.api.BaseResponse;
import org.slams.server.court.entity.NewCourt;
import org.slams.server.court.entity.Status;
import org.slams.server.court.entity.Texture;
import org.slams.server.user.dto.response.CreatorDto;
import org.slams.server.user.dto.response.SupervisorDto;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.ZoneOffset;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class NewCourtInDoneLookUpResponse {
public class NewCourtInDoneLookUpResponse extends BaseResponse {

private String id;
private String name;
Expand All @@ -23,14 +22,14 @@ public class NewCourtInDoneLookUpResponse {
private Texture texture;
private int basketCount;
private Status status;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private CreatorDto creator;
private SupervisorDto supervisor;

private NewCourtInDoneLookUpResponse(String id, String name, double latitude, double longitude,
private NewCourtInDoneLookUpResponse(Instant createdAt, Instant updatedAt,
String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status,
LocalDateTime createdAt, LocalDateTime updatedAt, CreatorDto creator, SupervisorDto supervisor) {
CreatorDto creator, SupervisorDto supervisor) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
this.latitude = latitude;
Expand All @@ -39,16 +38,15 @@ private NewCourtInDoneLookUpResponse(String id, String name, double latitude, do
this.texture = texture;
this.basketCount = basketCount;
this.status = status;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.creator = creator;
this.supervisor = supervisor;
}

public static NewCourtInDoneLookUpResponse toResponse(NewCourt newCourt) {
return new NewCourtInDoneLookUpResponse(newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
return new NewCourtInDoneLookUpResponse(newCourt.getCreatedAt().toInstant(ZoneOffset.UTC), newCourt.getUpdatedAt().toInstant(ZoneOffset.UTC),
newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(),
newCourt.getCreatedAt(), newCourt.getUpdatedAt(), CreatorDto.toDto(newCourt.getProposer()), SupervisorDto.toDto(newCourt.getSupervisor())
CreatorDto.toDto(newCourt.getProposer()), SupervisorDto.toDto(newCourt.getSupervisor())
);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
package org.slams.server.court.dto.response;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.slams.server.common.api.BaseResponse;
import org.slams.server.court.entity.NewCourt;
import org.slams.server.court.entity.Status;
import org.slams.server.court.entity.Texture;
import org.slams.server.user.dto.response.CreatorDto;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.ZoneOffset;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class NewCourtInReadyLookUpResponse {
public class NewCourtInReadyLookUpResponse extends BaseResponse {

private String id;
private String name;
Expand All @@ -22,13 +21,12 @@ public class NewCourtInReadyLookUpResponse {
private Texture texture;
private int basketCount;
private Status status;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private CreatorDto creator;

private NewCourtInReadyLookUpResponse(String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status,
LocalDateTime createdAt, LocalDateTime updatedAt, CreatorDto creator) {
private NewCourtInReadyLookUpResponse(Instant createdAt, Instant updatedAt,
String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status, CreatorDto creator) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
this.latitude = latitude;
Expand All @@ -37,15 +35,13 @@ private NewCourtInReadyLookUpResponse(String id, String name, double latitude, d
this.texture = texture;
this.basketCount = basketCount;
this.status = status;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.creator = creator;
}

public static NewCourtInReadyLookUpResponse toResponse(NewCourt newCourt) {
return new NewCourtInReadyLookUpResponse(newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(),
newCourt.getCreatedAt(), newCourt.getUpdatedAt(), CreatorDto.toDto(newCourt.getProposer()));
return new NewCourtInReadyLookUpResponse(newCourt.getCreatedAt().toInstant(ZoneOffset.UTC), newCourt.getUpdatedAt().toInstant(ZoneOffset.UTC),
newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(), CreatorDto.toDto(newCourt.getProposer()));
}

}
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package org.slams.server.court.dto.response;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.slams.server.common.api.BaseResponse;
import org.slams.server.court.entity.NewCourt;
import org.slams.server.court.entity.Status;
import org.slams.server.court.entity.Texture;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class NewCourtInsertResponse {
public class NewCourtInsertResponse extends BaseResponse {

private String id;
private String name;
Expand All @@ -21,12 +21,11 @@ public class NewCourtInsertResponse {
private Texture texture;
private int basketCount;
private Status status;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;

private NewCourtInsertResponse(String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status,
LocalDateTime createdAt, LocalDateTime updatedAt) {
private NewCourtInsertResponse(Instant createdAt, Instant updatedAt,
String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
this.latitude = latitude;
Expand All @@ -35,14 +34,12 @@ private NewCourtInsertResponse(String id, String name, double latitude, double l
this.texture = texture;
this.basketCount = basketCount;
this.status = status;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
}

public static NewCourtInsertResponse toResponse(NewCourt newCourt) {
return new NewCourtInsertResponse(newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(),
newCourt.getCreatedAt(), newCourt.getUpdatedAt());
return new NewCourtInsertResponse(newCourt.getCreatedAt().toInstant(ZoneOffset.UTC), newCourt.getUpdatedAt().toInstant(ZoneOffset.UTC),
newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus());
}

}
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
package org.slams.server.court.dto.response;

import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.slams.server.common.api.BaseResponse;
import org.slams.server.court.entity.NewCourt;
import org.slams.server.court.entity.Status;
import org.slams.server.court.entity.Texture;
import org.slams.server.user.dto.response.SupervisorDto;
import org.slams.server.user.entity.User;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneOffset;

@Getter
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class NewCourtResponse {
public class NewCourtResponse extends BaseResponse {

private String id;
private String name;
Expand All @@ -23,13 +23,12 @@ public class NewCourtResponse {
private Texture texture;
private int basketCount;
private Status status;
private LocalDateTime createdAt;
private LocalDateTime updatedAt;
private SupervisorDto supervisor;

private NewCourtResponse(String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status,
LocalDateTime createdAt, LocalDateTime updatedAt, SupervisorDto supervisor) {
private NewCourtResponse(Instant createdAt, Instant updatedAt,
String id, String name, double latitude, double longitude,
String image, Texture texture, int basketCount, Status status, SupervisorDto supervisor) {
super(createdAt, updatedAt);
this.id = id;
this.name = name;
this.latitude = latitude;
Expand All @@ -38,15 +37,13 @@ private NewCourtResponse(String id, String name, double latitude, double longitu
this.texture = texture;
this.basketCount = basketCount;
this.status = status;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.supervisor = supervisor;
}

public static NewCourtResponse toResponse(NewCourt newCourt, User supervisor) {
return new NewCourtResponse(newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(),
newCourt.getCreatedAt(), newCourt.getUpdatedAt(), SupervisorDto.toDto(supervisor));
return new NewCourtResponse(newCourt.getCreatedAt().toInstant(ZoneOffset.UTC), newCourt.getUpdatedAt().toInstant(ZoneOffset.UTC),
newCourt.getId().toString(), newCourt.getName(), newCourt.getLatitude(), newCourt.getLongitude(),
newCourt.getImage(), newCourt.getTexture(), newCourt.getBasketCount(), newCourt.getStatus(), SupervisorDto.toDto(supervisor));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,24 @@
import org.slams.server.court.dto.response.CourtInMapDto;
import org.slams.server.favorite.entity.Favorite;

import java.time.LocalDateTime;
import java.time.Instant;
import java.time.ZoneOffset;

@Getter
public class FavoriteInsertResponse extends BaseResponse {

private String id;
private CourtInMapDto court;

private FavoriteInsertResponse(LocalDateTime createdAt, LocalDateTime updatedAt, String id, CourtInMapDto court) {
private FavoriteInsertResponse(Instant createdAt, Instant updatedAt, String id, CourtInMapDto court) {
super(createdAt, updatedAt);
this.id = id;
this.court = court;
}

public static FavoriteInsertResponse toResponse(Favorite favorite) {
return new FavoriteInsertResponse(
favorite.getCreatedAt(), favorite.getUpdatedAt(), favorite.getId().toString(), CourtInMapDto.toDto(favorite.getCourt()));
return new FavoriteInsertResponse(favorite.getCreatedAt().toInstant(ZoneOffset.UTC), favorite.getUpdatedAt().toInstant(ZoneOffset.UTC),
favorite.getId().toString(), CourtInMapDto.toDto(favorite.getCourt()));
}

}
Loading

0 comments on commit 9882ca0

Please sign in to comment.