Skip to content

Commit

Permalink
modify :: type
Browse files Browse the repository at this point in the history
  • Loading branch information
meltapplee committed Sep 15, 2024
1 parent a7c278e commit e4a2732
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/org/meogo/domain/review/domain/Review.kt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Review(
val schoolId: Int,

@Column(nullable = false)
var star: Float,
var star: Int,

@Column(nullable = false)
var content: String,
Expand All @@ -39,7 +39,7 @@ class Review(
) {
fun updateReview(
content: String,
star: Float,
star: Int,
picture: String?
): Review {
this.content = content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ import javax.validation.constraints.Size
data class ModifyReviewRequest(
@field:Size(min = 1, max = 300)
val content: String,
val star: Float,
val star: Int,
val image: List<String>?
)
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ data class ReviewRequest(
@field:Size(min = 1, max = 300)
val content: String,
val schoolId: Int,
val star: Float,
val star: Int,
val keyWord: List<String>?
)
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ data class ReviewResponse(
val content: String,
val date: String,
val userName: String,
val star: Float,
val star: Int,
val image: List<String>?
)
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class CreateReviewService(
fun execute(request: ReviewRequest, image: List<MultipartFile>?) {
val user = userFacade.currentUser() ?: throw UserNotFoundException

if (request.star > 5.0 || request.star < 0.0) throw InvalidStarRangeException
if (request.star > 5 || request.star < 0) throw InvalidStarRangeException

val keyWord = request.keyWord?.joinToString(separator = ",")
val imageUrls = image?.joinToString(separator = ",") {
Expand Down

0 comments on commit e4a2732

Please sign in to comment.