Adds/collects Hunter endpoints and cleans up the code a bit
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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
|
||||
|
||||
/**
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user