Adds/collects Hunter endpoints and cleans up the code a bit

This commit is contained in:
2026-05-12 23:54:27 -05:00
parent 4a1077833e
commit b2ba9ce676
17 changed files with 115 additions and 60 deletions

View File

@@ -1,11 +1,7 @@
package net.halfbinary.scavengerhuntapi.model.converter
import net.halfbinary.scavengerhuntapi.model.domain.Team
import net.halfbinary.scavengerhuntapi.model.domain.TeamHunt
import net.halfbinary.scavengerhuntapi.model.record.TeamHuntRecord
import net.halfbinary.scavengerhuntapi.model.record.TeamRecord
import net.halfbinary.scavengerhuntapi.model.request.TeamRequest
import net.halfbinary.scavengerhuntapi.model.response.TeamResponse
fun TeamHunt.toRecord(): TeamHuntRecord {
return TeamHuntRecord(id, teamId, huntId)

View File

@@ -1,7 +1,7 @@
package net.halfbinary.scavengerhuntapi.model.domain
import net.halfbinary.scavengerhuntapi.model.TeamId
import java.util.UUID
import java.util.*
data class Team(
val id: TeamId = UUID.randomUUID(),

View File

@@ -3,7 +3,6 @@ package net.halfbinary.scavengerhuntapi.model.domain
import net.halfbinary.scavengerhuntapi.model.HuntId
import net.halfbinary.scavengerhuntapi.model.TeamHuntId
import net.halfbinary.scavengerhuntapi.model.TeamId
import java.util.UUID
data class TeamHunt(
val id: TeamHuntId = TeamHuntId.randomUUID(),

View File

@@ -3,7 +3,11 @@ package net.halfbinary.scavengerhuntapi.model.record
import jakarta.persistence.Entity
import jakarta.persistence.Id
import jakarta.persistence.Table
import net.halfbinary.scavengerhuntapi.model.*
import net.halfbinary.scavengerhuntapi.model.FoundId
import net.halfbinary.scavengerhuntapi.model.FoundStatus
import net.halfbinary.scavengerhuntapi.model.HuntId
import net.halfbinary.scavengerhuntapi.model.HunterId
import net.halfbinary.scavengerhuntapi.model.ItemId
import java.time.LocalDateTime
/**

View File

@@ -6,7 +6,6 @@ import jakarta.persistence.Table
import net.halfbinary.scavengerhuntapi.model.HuntId
import net.halfbinary.scavengerhuntapi.model.TeamHuntId
import net.halfbinary.scavengerhuntapi.model.TeamId
import java.util.*
@Entity
@Table(name = "team_hunt")