Skip to content

Commit

Permalink
standardize packet naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahgreenthal committed Oct 18, 2023
1 parent c08f9f0 commit 9b0c96d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main/kotlin/com/reinsteinquizbowl/order/entity/Packet.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ data class Packet(
var priceAsPracticeMaterial: BigDecimal? = null,
) {
fun isAvailableAsPracticeMaterial() = priceAsPracticeMaterial != null

fun getName() = "$yearCode regular-season packet $number"
}
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class Converter {

fun toApi(entity: Packet) = ApiPacket(
id = entity.id!!,
name = "${entity.yearCode} regular-season packet ${entity.number}",
name = entity.getName(),
yearCode = entity.yearCode!!,
number = entity.number!!,
availableForCompetition = entity.availableForCompetition!!,
Expand Down

0 comments on commit 9b0c96d

Please sign in to comment.