Skip to content

공연 북마크 기능 구현 #23

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

Closed
junha-ahn opened this issue Jul 10, 2023 · 1 comment · Fixed by #28
Closed

공연 북마크 기능 구현 #23

junha-ahn opened this issue Jul 10, 2023 · 1 comment · Fixed by #28
Assignees
Labels
enhancement New feature or request

Comments

@junha-ahn
Copy link
Member

junha-ahn commented Jul 10, 2023

Description

유저는 공연을 북마크 등록, 삭제할 수 있습니다 (수정은 없습니다)

To do

  • user_id, show_id를 가진다
  • create, delete API는 HTTP Body 또는 Param으로 user_id와 show_id를 받습니다
  • 해당 user_id와 show_id가 존재하는지 유저테이블과 공연테이블에서 확인 하지 않아도 됩니다
  • 실제 DB를 사용하지 않아도 됩니다. (Mockup test only)

Test Checklist

comment

@junha-ahn junha-ahn added the enhancement New feature or request label Jul 10, 2023
@junha-ahn junha-ahn moved this to Todo in Kanban backend Jul 10, 2023
@ParkJeongseop
Copy link
Collaborator

ParkJeongseop commented Jul 12, 2023

Test Checklist

controller
controller

  • BookmarkContoller.addBookmark(...)는 bookmarkService.create(...)를 호출해야 한다.
  • BookmarkContoller.addBookmark(...)가 정상적으로 호출되면 200 success를 반환한다.
  • BookmarkContoller.addBookmark(...)에 빈값을 넣으면 400 error를 반환한다.
  • BookmarkContoller.getBookmarks()는 bookmarkService.getList()를 호출해야 한다.
  • BookmarkContoller.getBookmark(id)는 bookmarkService.get(id)를 호출해야하고 정상적으로 호출되면 200 success를 반환한다.
  • BookmarkContoller.getBookmark(id)에 없는 ID를 넣으면 404 NotFound 를 반환한다.
  • BookmarkContoller.deleteBookmark(id)는 bookmarkService.delete(id)를 호출해야 한다.

service

  • bookmarkService.getList()는 repository.findAll()을 호출한다.
  • bookmarkService.get(id)는 repository.findByIdOrNull(id)을 호출한다.
  • bookmarkService.create(...)는 repository.save(...)을 호출한다.
  • bookmarkService.delete(id)는 repository.deleteById(id)을 호출한다.

repository

  • BookmarkContoller.addBookmark(...)는 bookmarkService.create(...)를 호출해야 한다.
  • BookmarkContoller.addBookmark(...)가 정상적으로 호출되면 200 success를 반환한다.
  • BookmarkContoller.addBookmark(...)에 빈값을 넣으면 400 error를 반환한다.
  • BookmarkContoller.getBookmarks()는 bookmarkService.getList()를 호출해야 한다.
  • BookmarkContoller.getBookmark(id)는 bookmarkService.get(id)를 호출해야하고 정상적으로 호출되면 200 success를 반환한다.
  • BookmarkContoller.getBookmark(id)에 없는 ID를 넣으면 404 NotFound 를 반환한다.
  • BookmarkContoller.deleteBookmark(id)는 bookmarkService.delete(id)를 호출해야 한다.

service

  • bookmarkService.getList()는 repository.findAll()을 호출한다.
  • bookmarkService.get(id)는 repository.findByIdOrNull(id)을 호출한다.
  • bookmarkService.create(...)는 repository.save(...)을 호출한다.
  • bookmarkService.delete(id)는 repository.deleteById(id)을 호출한다.

repository

ERD

image

@junha-ahn junha-ahn moved this from Todo to In Progress in Kanban backend Jul 12, 2023
@junha-ahn junha-ahn linked a pull request Jul 17, 2023 that will close this issue
13 tasks
@github-project-automation github-project-automation bot moved this from In Progress to Done in Kanban backend Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants