Skip to content

Commit

Permalink
Merge pull request #36 from DDD-Community/feature/POLABO-130
Browse files Browse the repository at this point in the history
feat: 4차 MVP 기획 변경 반영
  • Loading branch information
dldmsql authored Sep 22, 2024
2 parents 661d42f + 104481a commit 996caa5
Show file tree
Hide file tree
Showing 46 changed files with 210 additions and 475 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import jakarta.validation.constraints.Pattern
import java.util.*

data class BoardCreateRequest(
@Schema(description = "제목", example = "쏘니의 보드")
@field:Schema(description = "제목", example = "쏘니의 보드")
@field:NotBlank
@field:Pattern(regexp = "^(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[!@#$%^&*()_+=-])(?=.*[ㄱ-ㅎㅏ-ㅣ가-힣]).{1,20}$", message = "제목은 국문, 영문, 숫자, 특수문자, 띄어쓰기를 포함한 20자 이내여야 합니다.")
val title: String,
@Schema(description = "작성자 아이디", example = "null", required = false)
@field:Schema(description = "작성자 아이디", example = "null", required = false)
var userId: Long? = null
)
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
package com.ddd.sonnypolabobe.domain.board.controller.dto

import com.ddd.sonnypolabobe.domain.board.sticker.dto.StickerGetResponse
import com.ddd.sonnypolabobe.domain.polaroid.controller.dto.PolaroidGetResponse
import com.ddd.sonnypolabobe.domain.polaroid.dto.PolaroidGetResponse
import io.swagger.v3.oas.annotations.media.Schema

data class BoardGetResponse(
@Schema(description = "제목", example = "쏘니의 보드")
@field:Schema(description = "제목", example = "쏘니의 보드")
val title: String,
@Schema(description = "폴라로이드")
@field:Schema(description = "폴라로이드")
val items: List<PolaroidGetResponse>,
@Schema(description = "스티커 리스트")
val stickers : List<StickerGetResponse>?
)
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.ddd.sonnypolabobe.domain.board.my.dto

import com.fasterxml.jackson.annotation.JsonProperty
import io.swagger.v3.oas.annotations.media.Schema
import org.springframework.format.annotation.DateTimeFormat
import java.time.LocalDateTime
import java.util.UUID
Expand All @@ -9,26 +10,36 @@ class MyBoardDto {
companion object {
data class MBUpdateReq(
@JsonProperty("title")
@field:Schema(description = "제목", example = "쏘니의 보드")
val title: String
)

data class PageListRes(
@field:Schema(description = "보드 아이디", example = "01906259-94b2-74ef-8c13-554385c42943")
val id: UUID,
@field:Schema(description = "제목", example = "쏘니의 보드")
val title: String,
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE)
@field:Schema(description = "생성일", example = "2021-07-01")
val createdAt: LocalDateTime,
)

data class GetOneRes(
@field:Schema(description = "보드 아이디", example = "01906259-94b2-74ef-8c13-554385c42943")
val id: UUID,
@field:Schema(description = "제목", example = "쏘니의 보드")
val title: String,
@DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE)
@field:Schema(description = "생성일", example = "2021-07-01")
val createdAt: LocalDateTime,
@field:Schema(description = "작성자 아이디", example = "null", required = false)
val userId: Long?
)

data class TotalCountRes(
@field:Schema(description = "총 보드 생성 수", example = "100")
val totalCreateCount: Long,
@field:Schema(description = "총 참여자 수", example = "1000")
val totalParticipantCount: Long
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package com.ddd.sonnypolabobe.domain.board.service
import com.ddd.sonnypolabobe.domain.board.controller.dto.BoardCreateRequest
import com.ddd.sonnypolabobe.domain.board.controller.dto.BoardGetResponse
import com.ddd.sonnypolabobe.domain.board.repository.BoardJooqRepository
import com.ddd.sonnypolabobe.domain.board.sticker.dto.StickerGetResponse
import com.ddd.sonnypolabobe.domain.board.sticker.repository.BoardStickerRepository
import com.ddd.sonnypolabobe.domain.polaroid.controller.dto.PolaroidGetResponse
import com.ddd.sonnypolabobe.domain.polaroid.dto.PolaroidGetResponse
import com.ddd.sonnypolabobe.domain.polaroid.enumerate.PolaroidOption
import com.ddd.sonnypolabobe.domain.user.dto.UserDto
import com.ddd.sonnypolabobe.global.exception.ApplicationException
Expand All @@ -18,12 +16,10 @@ import com.fasterxml.jackson.databind.ObjectMapper
import org.springframework.beans.factory.annotation.Value
import org.springframework.stereotype.Service
import java.util.*
import javax.swing.text.html.HTML.Tag.U

@Service
class BoardService(
private val boardJooqRepository: BoardJooqRepository,
private val boardStickerRepository: BoardStickerRepository,
private val s3Util: S3Util,
@Value("\${limit.count}")
private val limit: Int
Expand All @@ -36,7 +32,6 @@ class BoardService(
return id.run {
val queryResult =
boardJooqRepository.selectOneById(UuidConverter.stringToUUID(this@run))
val stickers = boardStickerRepository.findByBoardId(UuidConverter.stringToUUID(id))
val groupByTitle = queryResult.groupBy { it.title }
groupByTitle.map { entry ->
val title = entry.key
Expand All @@ -53,7 +48,7 @@ class BoardService(

)
}.filter { it.id != 0L }.distinctBy { it.id }
BoardGetResponse(title = title ?: "", items = polaroids, stickers = stickers)
BoardGetResponse(title = title ?: "", items = polaroids)
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.ddd.sonnypolabobe.domain.file.controller.dto

import io.swagger.v3.oas.annotations.media.Schema

data class ImageResignedUrlResponse(
@field:Schema(description = "S3에 저장될 이미지 키", example = "imageKey")
val imageKey : String,
@field:Schema(description = "이미지 업로드를 위한 URL", example = "https://cloudfront.net/imageKey")
val url : String
)
Loading

0 comments on commit 996caa5

Please sign in to comment.