[F] Fix mai event id

pull/29/head
Azalea 2024-03-26 22:27:12 -04:00
parent 5ea2615b93
commit f314b3982e
3 changed files with 8 additions and 3 deletions

View File

@ -111,7 +111,7 @@ open class BaseEntity(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@JsonIgnore
var id: Long = 0
open var id: Long = 0
) : JavaSerializable {
override fun toString() = JACKSON.writeValueAsString(this)
}

View File

@ -11,6 +11,9 @@ import java.time.LocalDateTime
@Data @Entity
@Table(name = "maimai2_game_event")
class Mai2GameEvent : BaseEntity() {
@JsonIgnore(false)
override var id = 0L
var type = 0
var startDate: String? = null
var endDate: String? = null

View File

@ -1,5 +1,6 @@
package icu.samnyan.aqua.sega.maimai2.model.userdata
import com.fasterxml.jackson.annotation.JsonIgnore
import com.fasterxml.jackson.annotation.JsonInclude
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonSerialize
@ -13,8 +14,8 @@ import jakarta.persistence.*
@Entity(name = "Maimai2UserData")
@Table(name = "maimai2_user_detail")
class Mai2UserDetail(
@JsonSerialize(using = AccessCodeSerializer::class)
@JsonProperty(value = "accessCode", access = JsonProperty.Access.READ_ONLY)
@get:JsonSerialize(using = AccessCodeSerializer::class)
@get:JsonProperty(value = "accessCode", access = JsonProperty.Access.READ_ONLY)
@OneToOne
@JoinColumn(name = "aime_card_id", unique = true)
override var card: Card? = null,
@ -149,6 +150,7 @@ class Mai2UserDetail(
var currentPlayCount: Int? = 0,
var renameCredit: Int? = 0
) : BaseEntity(), IGenericUserData {
@get:JsonIgnore
override val totalScore: Long
get() = totalDeluxscore
}