Replaced Ints with Longs as database Ids.
This commit is contained in:
@@ -4,7 +4,7 @@ import play.api.libs.json.{JsString, JsValue, Json, OWrites, Writes}
|
||||
|
||||
import java.time.Instant
|
||||
|
||||
case class User(id: Option[Int], username: String, gid: String, passwordDigest: Option[String])
|
||||
case class User(id: Option[Long], username: String, gid: String, passwordDigest: Option[String])
|
||||
object User {
|
||||
given writes: Writes[User] = new Writes[User] {
|
||||
override def writes(o: User): JsValue = Json.obj(
|
||||
@@ -14,7 +14,7 @@ object User {
|
||||
}
|
||||
}
|
||||
|
||||
case class AuthToken(id: Option[Int], userId: Int, token: String, createdAt: Instant, expiresAt: Instant)
|
||||
case class AuthToken(id: Option[Long], userId: Long, token: String, createdAt: Instant, expiresAt: Instant)
|
||||
object AuthToken {
|
||||
given writes: OWrites[AuthToken] = (a: AuthToken) => Json.obj(
|
||||
"token" -> a.token,
|
||||
@@ -36,7 +36,7 @@ object AuctionStatus {
|
||||
implicit val writes: Writes[AuctionStatus] = (o: AuctionStatus) => JsString(o.toString)
|
||||
}
|
||||
|
||||
case class Auction(id: Option[Int], name: String, status: AuctionStatus, gid: String, authorId: Int,
|
||||
case class Auction(id: Option[Long], name: String, status: AuctionStatus, gid: String, authorId: Long,
|
||||
startingPrice: BigDecimal, currentBid: Option[BigDecimal],
|
||||
currentBidderId: Option[Int], currentBidAt: Option[Instant],
|
||||
createdAt: Instant)
|
||||
|
||||
Reference in New Issue
Block a user