[+] Computed name for user

pull/14/head
Azalea 2024-02-19 06:59:00 -05:00
parent 5715fa97f7
commit 5d258eb8e1
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ class AquaNetUser(
// One user can have multiple cards
@OneToMany(mappedBy = "aquaUser", cascade = [CascadeType.ALL])
var cards: MutableList<Card> = mutableListOf()
) : Serializable
) : Serializable {
val computedName get() = displayName.ifEmpty { username }
}
@Repository("AquaNetUserRepository")
interface AquaNetUserRepo : JpaRepository<AquaNetUser, Long> {