Removes redundant DB data fields and adds photo submission endpoint along with MinIO support for image storage

This commit is contained in:
2026-05-14 00:38:44 -05:00
parent 863c824421
commit 5ca7a685dd
15 changed files with 208 additions and 25 deletions

View File

@@ -0,0 +1,23 @@
package net.halfbinary.scavengerhuntapi.model.converter
import net.halfbinary.scavengerhuntapi.model.domain.Photo
import net.halfbinary.scavengerhuntapi.model.record.PhotoRecord
import net.halfbinary.scavengerhuntapi.model.response.PhotoResponse
fun Photo.toRecord() = PhotoRecord(
id = id,
itemId = itemId,
huntId = huntId,
hunterId = hunterId,
foundDateTime = foundDateTime,
status = status,
statusChangeDateTime = statusChangeDateTime
)
fun Photo.toResponse() = PhotoResponse(
id = id,
hunterId = hunterId,
photoUploadDateTime = foundDateTime,
photoStatus = status,
photoStatusChangeDateTime = statusChangeDateTime
)