Skip to content

Commit

Permalink
refactor: createMeetingTeam response 변경 (#118)
Browse files Browse the repository at this point in the history
* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: update db schema (#25)

initial setting for season4

* feat: add git actions for validating dev branch

* build: fix version of kotest

* build: add testcontainers

* feat: add sending code, verification code, checking email is already certificated (#35)

* feat: add Cert Entity

* feat: add send mail function to start certification

* feat: verify certification code

* feat: check email is already certificated

* chore: apply spotless

* fix: change variable name explicitly

* fix: remove nullablility from variables that should not be null

* fix: change from Random to SecureRandom

* fix: change hard coding email address

* chore: change status variables explicitly

* feat: add validation to request DTOs

* feat: validate email only 경희대 and 한국외대

* chore: change package name

* feat: change mail text pretty

* chore: run spotlessApply

* feat: set kotest and swagger with restdocs (#34)

- restdocs기반으로 swagger 세팅을 진행하였습니다.
- kotest 버전 수정을 하였습니다

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* feat: create payment api (#37)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: delete nickname and change api endpoint

* feat: 이메일 인증 구현 (#41)

* feat: copy and paste uoslife-server

* feat: add university column to seperate students

* feat: add redis dependency

* fix: change 한국외대 email

* feat: change domain name from Cerification to Verification

* feat: change unique code only number

* feat: change package name from certification to verification

* feat: change package name from certification to verification

* feat: change DB to redis to verify email

* feat: change DB to redis to verify email

* chore: annotate ttl for verification

* fix: checkVerification for redis cache

* fix: checkVerification for redis cache

* feat: reset verification if it already exists

* chore: apply spotless

* chore: change url

* feat: add aws dependency

* fix: fix getUniqueCode

* feat: remove university in VerificationRequest

* feat: change order to create verification

* feat: apply transaction when saving

* feat: methodize sending mail

* fix: change to fit crudrepository

* chore: remove the rest

* chore: apply spotlessApply

* feat: add swagger example

* feat: extract university from email

* feat: create user and save when checking verification code

* chore: import classes

* feat: change variables type for saving user have only email

* chore: change service reponse type to see clearly

* chore: add blank for push

* chore: remove blank for push

* feat: set id when creating empty User Entity

* feat: 이메일 인증 uri 수정

* feat: check user by email

* feat: change university enum capital

* chore: apply spotless things

* chore: merge test

* chore: validate test

* chore: apply spotless

* chore: apply lint

* refactor: change verification send request name

* fix: add whitelist uos email

* refactor: change verification code check DTO

* refactor: change verification code check response DTO

* refactor: delete useless DTO

* refactor: change verification send response DTO name

* refactor: change verification code check response DTO name

* refactor: change verification code send request, response DTO name

* feat: 인증코드 전송 요청 DTO에 대학 구분(University) 추가

* feat: 인증코드 검증 요청 DTO에 대학 구분(University) 추가

* refactor: request에 대학 구분 담겨있어 대학 추출 로직 삭제

* chore: 이메일 제목 변경

* chore: apply lint

* fix: update code based pr review

* Refactor: change api dto based season4 figma (#40)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* feat: change request in refundPaymentById  (#46)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

* fix: change request in refundById

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: 로그인 JWT 구현 (#42)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* chore: 잘못 머지해서 다시 PR 올립니다 (#48)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* refactor: test meetingTeam and match (#49)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: update findUserWithMeeting Query

* fix: update param in findUserWithMeetingTeam from single to triple

* fix: add religion in UserFindResponse

* style: kotlin lang style

* fix: delete test file

* fix: fix eror in query

* fix: delete exception in toMeetingTeamInformationGetResponse

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: change request param in refundByID (#52)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* feat: create method by portone

* feat: create requestPayment

* feat: create checkPayment

* feat: create refundPaymentById

* feat: create refundPayment

* style: format kotlin code style

* fix: add transactional

* fix: optimize file

* feat: add swagger form

* fix: add requestEntity and exception

* style: change kotline lang style

* refactor: change dao package location

* fix: change request in refundById

* feat: change refundByID Id to email

* feat: change name sex to gender

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: need to decide question type in MeetingTeamInformationUpdateRequest (#45)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: 인증코드 캐시 TTL 1시간으로 변경 (#51)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* feat: rebuild-server로부터 시대팅 User 생성 기능 구현

* refactor: 불필요한 메서드 제거

* fix: 유저 생성 시 id에 random uuid 삽입

* fix: User save를 위한 Transactional read only 제거

* feat: 시대생 마이그레이션 url 개방

* fix: 대학명 위치 userPersonalInformation 안으로 변경

* refactor: 유저 초기화 시즌4에 맞게 변경

* chore: apply spotless

* fix: 인증코드 캐시 TTL 1시간으로 변경

* feat: 시대생 마이그레이션 기능 추가 (#50)

* feat: copy and paste from rebuild-server

* feat: add exceptions

* feat: add tokens

* feat: add jwts

* feat: add dependency for jwt

* chore: pull from dev/season4

* feat: 토큰 검사 미실시 리스트 추가

* feat: 토큰 검사 로직 추가

* feat: 유저 이메일 유니크 속성 추가

* feat: 리퀘스트 인증코드와 DB 인증코드가 같은지 체크

* feat: 인증코드 인증 시 유저 생성

* feat: 이메일로 토큰 생성

* feat: 인증코드 인증 로직 구현

* feat: 토큰 DTO 추가

* feat: 이메일로 토큰 생성 로직 구현

* feat: 이메일로 유저 찾기

* feat: 토큰 refresh 로직 구현

* chore: apply spotless

* chore: 미사용 클래스 삭제

* chore: 미사용 메서드 삭제

* chore: 불필요한 주석 삭제

* chore: 미사용 메서드 삭제

* feat: 인증코드 검증 매치시 캐시에서 삭제

* chore: apply spotless

* fix: JWT에 email말고 id 담기로 변경

* chore: 유저 테스트 엔드포인트 변경

* chore: apply spotless

* chore: add blank for push

* feat: rebuild-server로부터 시대팅 User 생성 기능 구현

* refactor: 불필요한 메서드 제거

* fix: 유저 생성 시 id에 random uuid 삽입

* fix: User save를 위한 Transactional read only 제거

* feat: 시대생 마이그레이션 url 개방

* fix: 대학명 위치 userPersonalInformation 안으로 변경

* refactor: 유저 초기화 시즌4에 맞게 변경

* chore: apply spotless

* feat: 시대생 유저를 위한 로그인 기능 질문입니다 (#53)

* feat: 로그인 실패 예외 구현

* feat: 로그인 요청 DTO 구현

* feat: 시대생 로그인을 위한 device secret 추가

* feat: 시대생 로그인을 위한 device secret 추가

* feat: 로그인 jwt 필터 경유

* feat: 시대생 로그인 기능 구현

* feat: apply lint

* chore: 시대생만 사용하는 api uri 변경

* chore: 시대생만 사용하는 api uri 변경

* chore: 로그인 실패 예외 Http Status 변경

* feat: 유저 이용약관 기능 추가 (#54)

* feat: 유저 Tos 추가

* chore: 예외명 변경

* chore: 불필요 import 제거

* chore: apply lint

* ci: dockerfile 및 docker-compose 파일을 추가해 docker 환경에서 작동하도록 설정 (#56)

* chore: update swagger url in config (#57)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: update swagger url in config

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: docker-compose 환경에서 redis container도 함께 실행시킬 수 있도록 변경 (#58)

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* fix: 유저 정보 업데이트 기능 변경 (#55)

* feat: 상대에게 전하는 첫 메시지 message 컬럼 추가

* feat: 유저 정보 업데이트 기능 변경

* chore: apply lint

* refactor: 유저 개인정보 업데이트 메서드화

* chore: apply lint

* refactor: add error message(Exception) in swagger (#60)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>
Co-authored-by: 유현승 <gustmd5715@gmail.com>

* fix: 토큰 만료를 status 401 에러로 프론트에게 전송 (#59)

* feat: 상대에게 전하는 첫 메시지 message 컬럼 추가

* feat: 유저 정보 업데이트 기능 변경

* fix: 토큰 만료를 status 401 에러로 프론트에게 전송

* fix: 토큰 만료, 인가되지 않은 사용자만 예외 처리

* fix: Jwt 필터에서 default로 모든 Exception 예외 처리

* chore: 변수에 주석 추가

* chore: apply spotless

* refactor: add updateMeetingTeamMessage (#61)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: update findUserWithMeeting Query

* fix: update param in findUserWithMeetingTeam from single to triple

* fix: add religion in UserFindResponse

* style: kotlin lang style

* fix: delete test file

* fix: fix eror in query

* fix: delete exception in toMeetingTeamInformationGetResponse

* style: kotlin lang style

* fix: update error code

* feat: add updateMeetingTeamMessage

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: 시대생 토큰으로 회원가입 기능 구현 (#62)

* feat: 시대생으로부터 받아올 데이터

* feat: 시대생으로부터 유저 데이터 반환 기능 구현

* feat: Tos 삭제

* feat: 전화번호로 유저 중복 확인

* feat: 시대생 token으로 시대팅 로그인 기능 구현

* refactor: 토큰 발급 로직 위치 변경

* chore: apply spotless

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

* refactor: add schema in request (#63)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* refactor: delete unused field

* refactor: delete readOnly = true

* refactor: change param name

* style: kotlin lang style

* fix: 환불 파라미터 email에서 phonNumber 변경 (#65)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* fix: change email to phoneNumber

* style: kotlin lang style

* fix: delete test

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* fix: add swagger url

* refactor: 유저 도메인 request 스키마 추가 (#64)

* refactor: UserUpdateRequest 스키마 추가

* feat: 이메일로 유저 유무 체크 endpoint 활성화

* chore: apply lint

* fix: 최소 주량 스키마 수정

* fix: 스키마 enum type 단수 변경

* fix: 스키마 enum type 복수 변경

* refactor: field name

* refactor: delete unused field (#66)

* feat: hibernate-types for postgres jsonb type

* feat: change entity to jsonb columns

* feat: change service and test followed by entity changes

* feat: change meeting team column

- make information jsonb with dynamic json mapping
- delete preference and integrate with information columns

* test: change test code due to change in information type

* feat: add email and verified field for school verification

* feat: add payment to userTeam

* feat: add pk to userTeam

* feat: set foreign key in payments to meeting team not in user team

* feat: change compatibility to jsonb

* feat(sql): change ddl fit to change

* fix: delete jpa pk generation to use UUID

* feat: change mapping information

* feat: add algorithm code

* chore: formatting

* chore: add .gitignore jpa.lib

* feat: add pre commit hook with spotless

* chore: format with ktfmt

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* chore: change format to kotlin lang-style

* refactor: updateUser and createMeetingTeam

* refactor: joinMeetingTeam and getMeetingTeamUserList

* refactor: updateMeetingTeamInformation

* refactor: updateMeetingTeamPreference

* refactor: getMeetingTeamInformation

* feat: getMeetingTeamInformationByKakaoId

* fix: solve conflict

* style: change kotlin lang style

* fix: delete trash file

* fix: delete nickname and change api endpoint

* fix: update code based pr review

* feat: how to update meetingTeamInformationUpdateReqeust?

* refactor: decide MeetingTeamInformationUpdateRequest

* style: kotlin lang style

* docs: write exception in swagger

* style: kotlin lang style

* feat: apply validation in verification, match, user

* fix: teamName can be  null

* refactor: add field schema

* fix: change type

* style: kotlin lang style

* fix: update schema example

* style: kotlin lang style

* refactor: delete unused field

* refactor: delete readOnly = true

* refactor: change param name

* style: kotlin lang style

* fix: add swagger url

* refactor: field name

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>

* feat: add yaml

* fix: change field type

* fix: add secret

* fix: solve conflict

* refactor: add phoneNumber and myName in MeetingTeamInformationGetResponse

* refactor: update MatchInformationResponse

* style: kotlin lang style

* fix: update paymentGateway from kakao to welcome

* fix: add allowMethod options

* fix: delete message in user

* fix: update prod ses service

* docs: update swagger schema

* fix: add cors url

* fix: add allowheader for cors error

* refactor: refactor swagger api

* fix: change user attribute name in payment

* fix: update db migration

* fix: change user field name and update flyway

* fix: change ddl-auto from create to validate

* fix: update content-type

* chore: update accessToken expire time

* refactor: update dto

---------

Co-authored-by: SangMinLeeAI <sangmin.lee.ai@gmail.com>
Co-authored-by: SangMinLeeAI <96653505+SangMinLeeAI@users.noreply.github.com>
Co-authored-by: 유현승 <gustmd5715@gmail.com>
Co-authored-by: Hyeongjun Kang <86903678+marsboy02@users.noreply.github.com>
  • Loading branch information
5 people authored Apr 11, 2024
1 parent 72cf145 commit 40d9462
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import jakarta.validation.Valid
import java.util.UUID
import org.springframework.beans.factory.annotation.Qualifier
import org.springframework.http.HttpStatus
import org.springframework.http.MediaType
import org.springframework.http.ResponseEntity
import org.springframework.security.core.annotation.AuthenticationPrincipal
import org.springframework.security.core.userdetails.UserDetails
Expand All @@ -28,6 +27,7 @@ import uoslife.servermeeting.global.error.ErrorResponse
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamInformationUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamMessageUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamPreferenceUpdateRequest
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamCodeResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamInformationGetResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamUserListGetResponse
import uoslife.servermeeting.meetingteam.entity.enums.TeamType
Expand All @@ -54,11 +54,7 @@ class MeetingApi(
responseCode = "201",
description = "1대1의 경우 빈 문자열을 반환, 3대3의 경우 팀 코드(A-Z0-9 4개)(String)를 반환",
content =
[
Content(
mediaType = MediaType.TEXT_PLAIN_VALUE,
schema = Schema(implementation = String::class)
)]
[Content(schema = Schema(implementation = MeetingTeamCodeResponse::class))]
),
ApiResponse(
responseCode = "400",
Expand Down Expand Up @@ -128,22 +124,22 @@ class MeetingApi(
@PathVariable teamType: TeamType,
@PathVariable isTeamLeader: Boolean,
@RequestParam(required = false) name: String?,
): ResponseEntity<String?> {
): ResponseEntity<MeetingTeamCodeResponse> {
val userUUID = UUID.fromString(userDetails.username)

if (!isTeamLeader) {
throw OnlyTeamLeaderCanCreateTeamException()
}

val code =
val meetingTeamCodeResponse =
when (teamType) {
TeamType.SINGLE ->
singleMeetingService.createMeetingTeam(userUUID, name, teamType = teamType)
TeamType.TRIPLE ->
tripleMeetingService.createMeetingTeam(userUUID, name, teamType = teamType)
}

return ResponseEntity.status(HttpStatus.CREATED).body(code)
return ResponseEntity.status(HttpStatus.CREATED).body(meetingTeamCodeResponse)
}

@Operation(summary = "미팅 팀 참가", description = "1대1의 경우 지원되지 않음. 1대1은 미팅 팀 생성 시 자동으로 참가됨")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package uoslife.servermeeting.meetingteam.dto.response

class MeetingTeamCodeResponse(val code: String?)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import java.util.UUID
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamInformationUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamMessageUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamPreferenceUpdateRequest
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamCodeResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamInformationGetResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamUserListGetResponse
import uoslife.servermeeting.meetingteam.entity.enums.TeamType
Expand All @@ -18,7 +19,11 @@ interface BaseMeetingService {
* @param teamType
* @return
*/
fun createMeetingTeam(userUUID: UUID, name: String? = null, teamType: TeamType): String?
fun createMeetingTeam(
userUUID: UUID,
name: String? = null,
teamType: TeamType
): MeetingTeamCodeResponse
fun joinMeetingTeam(
userUUID: UUID,
code: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamInformationUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamMessageUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamPreferenceUpdateRequest
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamCodeResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamInformationGetResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamUserListGetResponse
import uoslife.servermeeting.meetingteam.entity.Information
Expand Down Expand Up @@ -37,14 +38,18 @@ class SingleMeetingService(
) : BaseMeetingService {

@Transactional
override fun createMeetingTeam(userUUID: UUID, name: String?, teamType: TeamType): String? {
override fun createMeetingTeam(
userUUID: UUID,
name: String?,
teamType: TeamType
): MeetingTeamCodeResponse {
val user = userRepository.findByIdOrNull(userUUID) ?: throw UserNotFoundException()
validator.isUserAlreadyHaveTeam(user)

val meetingTeam = createDefaultMeetingTeam(leader = user, teamType = teamType)

user.team = meetingTeam
return null
return MeetingTeamCodeResponse(code = null)
}

override fun joinMeetingTeam(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import org.springframework.transaction.annotation.Transactional
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamInformationUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamMessageUpdateRequest
import uoslife.servermeeting.meetingteam.dto.request.MeetingTeamPreferenceUpdateRequest
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamCodeResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamInformationGetResponse
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamUser
import uoslife.servermeeting.meetingteam.dto.response.MeetingTeamUserListGetResponse
Expand Down Expand Up @@ -41,7 +42,11 @@ class TripleMeetingService(
) : BaseMeetingService {

@Transactional
override fun createMeetingTeam(userUUID: UUID, name: String?, teamType: TeamType): String? {
override fun createMeetingTeam(
userUUID: UUID,
name: String?,
teamType: TeamType
): MeetingTeamCodeResponse {
val user = userRepository.findByIdOrNull(userUUID) ?: throw UserNotFoundException()

validator.isUserAlreadyHaveTeam(user)
Expand All @@ -51,7 +56,7 @@ class TripleMeetingService(
val meetingTeam = saveMeetingTeam(user, name, code)

user.team = meetingTeam
return code
return MeetingTeamCodeResponse(code)
}

@Transactional
Expand Down

0 comments on commit 40d9462

Please sign in to comment.