Skip to content

Commit

Permalink
chore: Add validation
Browse files Browse the repository at this point in the history
  • Loading branch information
210-reverof committed Aug 19, 2024
1 parent 710c0e7 commit bc85d9b
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
package com.mashup.pic.event.controller.dto

import com.mashup.pic.event.applicationService.dto.UploadImageServiceRequest
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size

data class UploadImageRequest(
val eventId: Long,
val imageUrls: List<String>
@field:NotNull val eventId: Long,
@field:Size(min = 1) val imageUrls: List<String>
)

fun UploadImageRequest.toServiceRequest(userId: Long): UploadImageServiceRequest = UploadImageServiceRequest(userId, eventId, imageUrls)

0 comments on commit bc85d9b

Please sign in to comment.