diff --git a/src/main/kotlin/com/nexters/bottles/bottle/controller/BottleController.kt b/src/main/kotlin/com/nexters/bottles/bottle/controller/BottleController.kt index 9caae9d1..2286a985 100644 --- a/src/main/kotlin/com/nexters/bottles/bottle/controller/BottleController.kt +++ b/src/main/kotlin/com/nexters/bottles/bottle/controller/BottleController.kt @@ -3,6 +3,7 @@ package com.nexters.bottles.bottle.controller import com.nexters.bottles.bottle.facade.BottleFacade import com.nexters.bottles.bottle.facade.dto.BottleDetailResponseDto import com.nexters.bottles.bottle.facade.dto.BottleListResponseDto +import io.swagger.annotations.ApiOperation import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PathVariable import org.springframework.web.bind.annotation.PostMapping @@ -15,16 +16,19 @@ class BottleController( private val bottleFacade: BottleFacade ) { + @ApiOperation("홈 - 받은 보틀 목록 조회하기") @GetMapping fun getBottlesList(): BottleListResponseDto { return bottleFacade.getBottles() } + @ApiOperation("홈 - 보틀 상세 정보 조회하기") @GetMapping("/{bottleId}") fun getBottleDetail(@PathVariable bottleId: Long): BottleDetailResponseDto { return bottleFacade.getBottle(bottleId) } + @ApiOperation("홈 - 보틀에 내 소개 보내기(수락하기)") @PostMapping("/{bottleId}/accept") fun acceptBottle(@PathVariable bottleId: Long) { bottleFacade.acceptBottle(bottleId) diff --git a/src/main/kotlin/com/nexters/bottles/user/controller/UserProfileController.kt b/src/main/kotlin/com/nexters/bottles/user/controller/UserProfileController.kt index 5a6ac93f..88d04fa6 100644 --- a/src/main/kotlin/com/nexters/bottles/user/controller/UserProfileController.kt +++ b/src/main/kotlin/com/nexters/bottles/user/controller/UserProfileController.kt @@ -5,6 +5,7 @@ import com.nexters.bottles.user.facade.dto.RegisterIntroductionRequestDto import com.nexters.bottles.user.facade.dto.RegisterProfileRequestDto import com.nexters.bottles.user.facade.UserProfileFacade import com.nexters.bottles.user.facade.dto.UserProfileResponseDto +import io.swagger.annotations.ApiOperation import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.PostMapping import org.springframework.web.bind.annotation.RequestBody @@ -17,21 +18,25 @@ class UserProfileController( private val profileFacade: UserProfileFacade, ) { + @ApiOperation("온보딩 프로필 등록하기") @PostMapping("/choice") fun upsertProfile(@RequestBody registerProfileRequestDto: RegisterProfileRequestDto) { profileFacade.upsertProfile(registerProfileRequestDto) } + @ApiOperation("온보딩 선택지 조회하기 - 지역") @GetMapping("/choice") fun getProfileChoiceList() : ProfileChoiceResponseDto { return profileFacade.getProfileChoice() } + @ApiOperation("마이페이지 자기소개 등록하기") @PostMapping("/introduction") fun upsertIntroduction(@RequestBody registerIntroductionRequestDto: RegisterIntroductionRequestDto) { profileFacade.upsertIntroduction(registerIntroductionRequestDto) } + @ApiOperation("마이페이지 내 프로필 조회하기") @GetMapping fun getProfile(): UserProfileResponseDto { return profileFacade.getProfile() diff --git a/src/main/resources/sql/table_query.sql b/src/main/resources/sql/table_query.sql index 490a8eb1..124b9bf7 100644 --- a/src/main/resources/sql/table_query.sql +++ b/src/main/resources/sql/table_query.sql @@ -1,4 +1,4 @@ -CREATE TABLE User ( +CREATE TABLE user ( id BIGINT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) DEFAULT NULL, birthdate DATE DEFAULT NULL, @@ -29,7 +29,7 @@ CREATE TABLE bottle ping_pong_status VARCHAR(20) DEFAULT 'NONE' NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL -) +); CREATE TABLE letter ( @@ -41,10 +41,10 @@ CREATE TABLE letter is_read BOOLEAN DEFAULT FALSE NOT NULL, created_at DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL -) +); CREATE TABLE question ( id BIGINT AUTO_INCREMENT PRIMARY KEY, question VARCHAR(255) NOT NULL -) +);