forked from Cookies_Github_mirror/AquaDX
[O] Huge refactor
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import lombok.Data
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Data @Entity
|
||||
@Table(name = "maimai2_game_event")
|
||||
class Mai2GameEvent : BaseEntity() {
|
||||
private val type = 0
|
||||
private val startDate: String? = null
|
||||
private val endDate: String? = null
|
||||
|
||||
@JsonIgnore
|
||||
private val enable = false
|
||||
}
|
||||
|
||||
@Data @Entity
|
||||
@Table(name = "maimai2_game_charge")
|
||||
class Mai2GameCharge : BaseEntity() {
|
||||
@Column(unique = true)
|
||||
var chargeId = 0L
|
||||
val orderId = 0L
|
||||
val price = 0
|
||||
val startDate: String? = null
|
||||
val endDate: String? = null
|
||||
}
|
||||
|
||||
@Data @Entity
|
||||
@Table(name = "maimai2_game_selling_card")
|
||||
class Mai2GameSellingCard : BaseEntity() {
|
||||
private val cardId = 0L
|
||||
private val startDate: LocalDateTime? = null
|
||||
private val endDate: LocalDateTime? = null
|
||||
private val noticeStartDate: LocalDateTime? = null
|
||||
private val noticeEndDate: LocalDateTime? = null
|
||||
}
|
||||
@@ -5,9 +5,6 @@ package icu.samnyan.aqua.sega.maimai2.model
|
||||
import icu.samnyan.aqua.net.games.GenericPlaylogRepo
|
||||
import icu.samnyan.aqua.net.games.GenericUserDataRepo
|
||||
import icu.samnyan.aqua.sega.general.model.Card
|
||||
import icu.samnyan.aqua.sega.maimai2.model.gamedata.GameCharge
|
||||
import icu.samnyan.aqua.sega.maimai2.model.gamedata.GameEvent
|
||||
import icu.samnyan.aqua.sega.maimai2.model.gamedata.GameSellingCard
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.*
|
||||
import org.springframework.data.domain.Page
|
||||
import org.springframework.data.domain.Pageable
|
||||
@@ -19,99 +16,99 @@ import java.util.*
|
||||
|
||||
@NoRepositoryBean
|
||||
interface UserLinked<T>: JpaRepository<T, Long> {
|
||||
fun findByUser(user: UserDetail): List<T>
|
||||
fun findSingleByUser(user: UserDetail): Optional<T>
|
||||
fun findByUser(user: Mai2UserDetail): List<T>
|
||||
fun findSingleByUser(user: Mai2UserDetail): Optional<T>
|
||||
fun findByUser_Card_ExtId(userId: Long): List<T>
|
||||
fun findByUser_Card_ExtId(userId: Long, page: Pageable): Page<T>
|
||||
fun findSingleByUser_Card_ExtId(userId: Long): Optional<T>
|
||||
@Transactional
|
||||
fun deleteByUser(user: UserDetail)
|
||||
fun deleteByUser(user: Mai2UserDetail)
|
||||
}
|
||||
|
||||
interface Mai2MapEncountNpcRepo : UserLinked<MapEncountNpc>
|
||||
interface Mai2MapEncountNpcRepo : UserLinked<Mai2MapEncountNpc>
|
||||
|
||||
interface Mai2UserActRepo : UserLinked<UserAct> {
|
||||
fun findByUserAndKindAndActivityId(user: UserDetail, kind: Int, id: Int): Optional<UserAct>
|
||||
interface Mai2UserActRepo : UserLinked<Mai2UserAct> {
|
||||
fun findByUserAndKindAndActivityId(user: Mai2UserDetail, kind: Int, id: Int): Optional<Mai2UserAct>
|
||||
|
||||
fun findByUser_Card_ExtIdAndKind(userId: Long, kind: Int): List<UserAct>
|
||||
fun findByUser_Card_ExtIdAndKind(userId: Long, kind: Int): List<Mai2UserAct>
|
||||
}
|
||||
|
||||
interface Mai2UserCardRepo : UserLinked<UserCard> {
|
||||
fun findByUserAndCardId(user: UserDetail, cardId: Int): Optional<UserCard>
|
||||
interface Mai2UserCardRepo : UserLinked<Mai2UserCard> {
|
||||
fun findByUserAndCardId(user: Mai2UserDetail, cardId: Int): Optional<Mai2UserCard>
|
||||
}
|
||||
|
||||
interface Mai2UserCharacterRepo : UserLinked<UserCharacter> {
|
||||
fun findByUserAndCharacterId(user: UserDetail, characterId: Int): Optional<UserCharacter>
|
||||
interface Mai2UserCharacterRepo : UserLinked<Mai2UserCharacter> {
|
||||
fun findByUserAndCharacterId(user: Mai2UserDetail, characterId: Int): Optional<Mai2UserCharacter>
|
||||
}
|
||||
|
||||
interface Mai2UserChargeRepo : UserLinked<UserCharge>
|
||||
interface Mai2UserChargeRepo : UserLinked<Mai2UserCharge>
|
||||
|
||||
interface Mai2UserCourseRepo : UserLinked<UserCourse> {
|
||||
fun findByUserAndCourseId(user: UserDetail, courseId: Int): Optional<UserCourse>
|
||||
interface Mai2UserCourseRepo : UserLinked<Mai2UserCourse> {
|
||||
fun findByUserAndCourseId(user: Mai2UserDetail, courseId: Int): Optional<Mai2UserCourse>
|
||||
}
|
||||
|
||||
interface Mai2UserDataRepo : GenericUserDataRepo<UserDetail> {
|
||||
fun findByCardExtId(userId: Long): Optional<UserDetail>
|
||||
interface Mai2UserDataRepo : GenericUserDataRepo<Mai2UserDetail> {
|
||||
fun findByCardExtId(userId: Long): Optional<Mai2UserDetail>
|
||||
|
||||
@Transactional
|
||||
fun deleteByCard(card: Card)
|
||||
}
|
||||
|
||||
interface Mai2UserExtendRepo : UserLinked<UserExtend>
|
||||
interface Mai2UserExtendRepo : UserLinked<Mai2UserExtend>
|
||||
|
||||
interface Mai2UserFavoriteRepo : UserLinked<UserFavorite> {
|
||||
fun findByUserAndItemKind(user: UserDetail, kind: Int): Optional<UserFavorite>
|
||||
interface Mai2UserFavoriteRepo : UserLinked<Mai2UserFavorite> {
|
||||
fun findByUserAndItemKind(user: Mai2UserDetail, kind: Int): Optional<Mai2UserFavorite>
|
||||
|
||||
fun findByUserIdAndItemKind(userId: Long, kind: Int): List<UserFavorite>
|
||||
fun findByUserIdAndItemKind(userId: Long, kind: Int): List<Mai2UserFavorite>
|
||||
}
|
||||
|
||||
interface Mai2UserFriendSeasonRankingRepo : UserLinked<UserFriendSeasonRanking> {
|
||||
fun findByUserAndSeasonId(user: UserDetail, seasonId: Int): Optional<UserFriendSeasonRanking>
|
||||
interface Mai2UserFriendSeasonRankingRepo : UserLinked<Mai2UserFriendSeasonRanking> {
|
||||
fun findByUserAndSeasonId(user: Mai2UserDetail, seasonId: Int): Optional<Mai2UserFriendSeasonRanking>
|
||||
}
|
||||
|
||||
interface Mai2UserGeneralDataRepo : UserLinked<UserGeneralData> {
|
||||
fun findByUserAndPropertyKey(user: UserDetail, key: String): Optional<UserGeneralData>
|
||||
interface Mai2UserGeneralDataRepo : UserLinked<Mai2UserGeneralData> {
|
||||
fun findByUserAndPropertyKey(user: Mai2UserDetail, key: String): Optional<Mai2UserGeneralData>
|
||||
|
||||
fun findByUser_Card_ExtIdAndPropertyKey(userId: Long, key: String): Optional<UserGeneralData>
|
||||
fun findByUser_Card_ExtIdAndPropertyKey(userId: Long, key: String): Optional<Mai2UserGeneralData>
|
||||
}
|
||||
|
||||
interface Mai2UserItemRepo : UserLinked<UserItem> {
|
||||
fun findByUserAndItemKindAndItemId(user: UserDetail, itemKind: Int, itemId: Int): Optional<UserItem>
|
||||
interface Mai2UserItemRepo : UserLinked<Mai2UserItem> {
|
||||
fun findByUserAndItemKindAndItemId(user: Mai2UserDetail, itemKind: Int, itemId: Int): Optional<Mai2UserItem>
|
||||
|
||||
fun findByUser_Card_ExtIdAndItemKind(userId: Long, kind: Int, page: Pageable): Page<UserItem>
|
||||
fun findByUser_Card_ExtIdAndItemKind(userId: Long, kind: Int, page: Pageable): Page<Mai2UserItem>
|
||||
}
|
||||
|
||||
interface Mai2UserLoginBonusRepo : UserLinked<UserLoginBonus> {
|
||||
fun findByUserAndBonusId(user: UserDetail, bonusId: Int): Optional<UserLoginBonus>
|
||||
interface Mai2UserLoginBonusRepo : UserLinked<Mai2UserLoginBonus> {
|
||||
fun findByUserAndBonusId(user: Mai2UserDetail, bonusId: Int): Optional<Mai2UserLoginBonus>
|
||||
}
|
||||
|
||||
interface Mai2UserMapRepo : UserLinked<UserMap> {
|
||||
fun findByUserAndMapId(user: UserDetail, mapId: Int): Optional<UserMap>
|
||||
interface Mai2UserMapRepo : UserLinked<Mai2UserMap> {
|
||||
fun findByUserAndMapId(user: Mai2UserDetail, mapId: Int): Optional<Mai2UserMap>
|
||||
}
|
||||
|
||||
interface Mai2UserMusicDetailRepo : UserLinked<UserMusicDetail> {
|
||||
fun findByUser_Card_ExtIdAndMusicId(userId: Long, id: Int): List<UserMusicDetail>
|
||||
interface Mai2UserMusicDetailRepo : UserLinked<Mai2UserMusicDetail> {
|
||||
fun findByUser_Card_ExtIdAndMusicId(userId: Long, id: Int): List<Mai2UserMusicDetail>
|
||||
|
||||
fun findByUserAndMusicIdAndLevel(user: UserDetail, musicId: Int, level: Int): Optional<UserMusicDetail>
|
||||
fun findByUserAndMusicIdAndLevel(user: Mai2UserDetail, musicId: Int, level: Int): Optional<Mai2UserMusicDetail>
|
||||
}
|
||||
|
||||
interface Mai2UserOptionRepo : UserLinked<UserOption>
|
||||
interface Mai2UserOptionRepo : UserLinked<Mai2UserOption>
|
||||
|
||||
interface Mai2UserPlaylogRepo : GenericPlaylogRepo<UserPlaylog>, UserLinked<UserPlaylog> {
|
||||
fun findByUser_Card_ExtIdAndMusicIdAndLevel(userId: Long, musicId: Int, level: Int): List<UserPlaylog>
|
||||
interface Mai2UserPlaylogRepo : GenericPlaylogRepo<Mai2UserPlaylog>, UserLinked<Mai2UserPlaylog> {
|
||||
fun findByUser_Card_ExtIdAndMusicIdAndLevel(userId: Long, musicId: Int, level: Int): List<Mai2UserPlaylog>
|
||||
}
|
||||
|
||||
interface Mai2UserPrintDetailRepo : JpaRepository<UserPrintDetail, Long>
|
||||
interface Mai2UserPrintDetailRepo : JpaRepository<Mai2UserPrintDetail, Long>
|
||||
|
||||
interface Mai2UserUdemaeRepo : UserLinked<UserUdemae>
|
||||
interface Mai2UserUdemaeRepo : UserLinked<Mai2UserUdemae>
|
||||
|
||||
interface Mai2GameChargeRepo : JpaRepository<GameCharge, Long>
|
||||
interface Mai2GameChargeRepo : JpaRepository<Mai2GameCharge, Long>
|
||||
|
||||
interface Mai2GameEventRepo : JpaRepository<GameEvent, Int> {
|
||||
fun findByTypeAndEnable(type: Int, enable: Boolean): List<GameEvent>
|
||||
interface Mai2GameEventRepo : JpaRepository<Mai2GameEvent, Int> {
|
||||
fun findByTypeAndEnable(type: Int, enable: Boolean): List<Mai2GameEvent>
|
||||
}
|
||||
|
||||
interface Mai2GameSellingCardRepo : JpaRepository<GameSellingCard, Long>
|
||||
interface Mai2GameSellingCardRepo : JpaRepository<Mai2GameSellingCard, Long>
|
||||
|
||||
@Component
|
||||
class Mai2Repos(
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.gamedata
|
||||
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import lombok.AllArgsConstructor
|
||||
import lombok.Data
|
||||
import lombok.NoArgsConstructor
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2GameCharge")
|
||||
@Table(name = "maimai2_game_charge")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
class GameCharge : Serializable, BaseEntity() {
|
||||
val orderId = 0
|
||||
|
||||
@Column(unique = true)
|
||||
var chargeId = 0
|
||||
|
||||
val price = 0
|
||||
|
||||
val startDate: String? = null
|
||||
|
||||
val endDate: String? = null
|
||||
|
||||
companion object {
|
||||
const val serialVersionUID = 1L
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2GameEvent")
|
||||
@Table(name = "maimai2_game_event")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameEvent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private int type;
|
||||
|
||||
private String startDate;
|
||||
|
||||
private String endDate;
|
||||
|
||||
@JsonIgnore
|
||||
private boolean enable;
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2GameSellingCard")
|
||||
@Table(name = "maimai2_game_selling_card")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameSellingCard implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private int id;
|
||||
private int cardId;
|
||||
private LocalDateTime startDate;
|
||||
private LocalDateTime endDate;
|
||||
private LocalDateTime noticeStartDate;
|
||||
private LocalDateTime noticeEndDate;
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserPlaylog;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserPlaylog;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
@@ -16,5 +16,5 @@ import icu.samnyan.aqua.sega.maimai2.model.userdata.UserPlaylog;
|
||||
@NoArgsConstructor
|
||||
public class UploadUserPlaylog implements Serializable {
|
||||
private long userId;
|
||||
private UserPlaylog userPlaylog;
|
||||
private Mai2UserPlaylog userPlaylog;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.request;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserPrintDetail;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserPrintDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -18,5 +18,5 @@ public class UpsertUserPrint implements Serializable {
|
||||
private long userId;
|
||||
private long orderId;
|
||||
private Map<String, Object> userPrintReserve;
|
||||
private UserPrintDetail userPrintDetail;
|
||||
private Mai2UserPrintDetail userPrintDetail;
|
||||
}
|
||||
|
||||
@@ -18,20 +18,20 @@ import java.util.Map;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserAll implements Serializable {
|
||||
private List<UserDetail> userData;
|
||||
private List<UserExtend> userExtend;
|
||||
private List<UserOption> userOption;
|
||||
private List<UserCharacter> userCharacterList;
|
||||
private List<UserGhost> userGhost;
|
||||
private List<UserMap> userMapList;
|
||||
private List<UserLoginBonus> userLoginBonusList;
|
||||
private List<Mai2UserDetail> userData;
|
||||
private List<Mai2UserExtend> userExtend;
|
||||
private List<Mai2UserOption> userOption;
|
||||
private List<Mai2UserCharacter> userCharacterList;
|
||||
private List<Mai2UserGhost> userGhost;
|
||||
private List<Mai2UserMap> userMapList;
|
||||
private List<Mai2UserLoginBonus> userLoginBonusList;
|
||||
private List<UserRating> userRatingList;
|
||||
private List<UserItem> userItemList;
|
||||
private List<UserMusicDetail> userMusicDetailList;
|
||||
private List<UserCourse> userCourseList;
|
||||
private List<UserFriendSeasonRanking> userFriendSeasonRankingList;
|
||||
private List<UserCharge> userChargeList;
|
||||
private List<UserFavorite> userFavoriteList;
|
||||
private List<Mai2UserItem> userItemList;
|
||||
private List<Mai2UserMusicDetail> userMusicDetailList;
|
||||
private List<Mai2UserCourse> userCourseList;
|
||||
private List<Mai2UserFriendSeasonRanking> userFriendSeasonRankingList;
|
||||
private List<Mai2UserCharge> userChargeList;
|
||||
private List<Mai2UserFavorite> userFavoriteList;
|
||||
private List<UserActivity> userActivityList;
|
||||
private List<Map<String, Object>> userGamePlaylogList;
|
||||
private String isNewCharacterList;
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.maimai2.model.response.data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserAct;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserAct;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -14,6 +14,6 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserActivity {
|
||||
private List<UserAct> playList;
|
||||
private List<UserAct> musicList;
|
||||
private List<Mai2UserAct> playList;
|
||||
private List<Mai2UserAct> musicList;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.maimai2.model.response.data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserMusicDetail;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserMusicDetail;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -14,5 +14,5 @@ import lombok.NoArgsConstructor;
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserMusic {
|
||||
private List<UserMusicDetail> userMusicDetailList;
|
||||
private List<Mai2UserMusicDetail> userMusicDetailList;
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@ package icu.samnyan.aqua.sega.maimai2.model.response.data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserRate;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.UserUdemae;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserRate;
|
||||
import icu.samnyan.aqua.sega.maimai2.model.userdata.Mai2UserUdemae;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -16,9 +16,9 @@ import lombok.NoArgsConstructor;
|
||||
@NoArgsConstructor
|
||||
public class UserRating {
|
||||
private int rating;
|
||||
private List<UserRate> ratingList;
|
||||
private List<UserRate> newRatingList;
|
||||
private List<UserRate> nextRatingList;
|
||||
private List<UserRate> nextNewRatingList;
|
||||
private UserUdemae udemae;
|
||||
private List<Mai2UserRate> ratingList;
|
||||
private List<Mai2UserRate> newRatingList;
|
||||
private List<Mai2UserRate> nextRatingList;
|
||||
private List<Mai2UserRate> nextNewRatingList;
|
||||
private Mai2UserUdemae udemae;
|
||||
}
|
||||
|
||||
@@ -3,21 +3,16 @@ package icu.samnyan.aqua.sega.maimai2.model.userdata
|
||||
import com.fasterxml.jackson.annotation.JsonInclude
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize
|
||||
import ext.Str
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import icu.samnyan.aqua.net.games.IGenericUserData
|
||||
import icu.samnyan.aqua.sega.general.model.Card
|
||||
import icu.samnyan.aqua.sega.maimai2.util.IntegerListConverter
|
||||
import icu.samnyan.aqua.sega.util.jackson.AccessCodeSerializer
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserData")
|
||||
@Table(name = "maimai2_user_detail")
|
||||
class UserDetail(
|
||||
class Mai2UserDetail(
|
||||
@JsonSerialize(using = AccessCodeSerializer::class)
|
||||
@JsonProperty(value = "accessCode", access = JsonProperty.Access.READ_ONLY)
|
||||
@OneToOne
|
||||
@@ -28,8 +23,8 @@ class UserDetail(
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var friendCode: Str = "",
|
||||
var isNetMember: Int = 0,
|
||||
var friendCode: String = "",
|
||||
var isNetMember: Int = 1,
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
@@ -153,7 +148,7 @@ class UserDetail(
|
||||
// TODO: Make these non-nullable with default value
|
||||
var currentPlayCount: Int? = 0,
|
||||
var renameCredit: Int? = 0
|
||||
) : Serializable, IGenericUserData, BaseEntity() {
|
||||
) : BaseEntity(), IGenericUserData {
|
||||
override val totalScore: Long
|
||||
get() = totalDeluxscore
|
||||
}
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2MapEncountNpc")
|
||||
@Table(name = "maimai2_user_npc_encount")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class MapEncountNpc implements Serializable{
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
private int npcId;
|
||||
private int musicId;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "extend_id")
|
||||
private UserExtend userExtend;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserActivity")
|
||||
@Table(name = "maimai2_user_activity")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonPropertyOrder({"kind", "id", "sortNumber", "param1", "param2", "param3", "param4"})
|
||||
public class UserAct implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int kind;
|
||||
|
||||
@JsonProperty("id")
|
||||
private int activityId;
|
||||
|
||||
private long sortNumber;
|
||||
private int param1;
|
||||
private int param2;
|
||||
private int param3;
|
||||
private int param4;
|
||||
|
||||
public UserAct(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserCard")
|
||||
@Table(name = "maimai2_user_card")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserCard implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
public int cardId;
|
||||
public int cardTypeId;
|
||||
public int charaId;
|
||||
public int mapId;
|
||||
public String startDate;
|
||||
public String endDate;
|
||||
|
||||
public UserCard(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserCharacter")
|
||||
@Table(name = "maimai2_user_character")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserCharacter implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int characterId;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private int point = 0;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private int count = 0;
|
||||
private int level;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private int nextAwake = 0;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private int nextAwakePercent = 0;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private boolean favorite = false;
|
||||
private int awakening;
|
||||
private int useCount;
|
||||
|
||||
public UserCharacter(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserCharge")
|
||||
@Table(name = "maimai2_user_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "charge_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"chargeId", "stock", "purchaseDate", "validDate"})
|
||||
public class UserCharge implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
@Column(name = "charge_id")
|
||||
private int chargeId;
|
||||
|
||||
private int stock;
|
||||
|
||||
private String purchaseDate;
|
||||
|
||||
private String validDate;
|
||||
|
||||
public UserCharge(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "MaiMai2UserCourse")
|
||||
@Table(name = "maimai2_user_course")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserCourse implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int courseId;
|
||||
@JsonProperty("isLastClear")
|
||||
private boolean isLastClear;
|
||||
private int totalRestlife;
|
||||
private int totalAchievement;
|
||||
private int totalDeluxscore;
|
||||
private int playCount;
|
||||
private String clearDate;
|
||||
private String lastPlayDate;
|
||||
private int bestAchievement;
|
||||
private String bestAchievementDate;
|
||||
private int bestDeluxscore;
|
||||
private String bestDeluxscoreDate;
|
||||
|
||||
public UserCourse(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,572 @@
|
||||
@file:Suppress("unused")
|
||||
|
||||
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.annotation.JsonPropertyOrder
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import icu.samnyan.aqua.net.games.IGenericGamePlaylog
|
||||
import icu.samnyan.aqua.sega.maimai2.util.IntegerListConverter
|
||||
import jakarta.persistence.*
|
||||
import lombok.AllArgsConstructor
|
||||
import lombok.Data
|
||||
import lombok.NoArgsConstructor
|
||||
|
||||
@MappedSuperclass
|
||||
open class Mai2UserEntity : BaseEntity() {
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
open var user: Mai2UserDetail? = null
|
||||
}
|
||||
|
||||
|
||||
@Table(name = "maimai2_user_npc_encount")
|
||||
@Data @Entity
|
||||
class Mai2MapEncountNpc : Mai2UserEntity() {
|
||||
|
||||
var npcId = 0
|
||||
var musicId = 0
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "extend_id")
|
||||
var userExtend: Mai2UserExtend? = null
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_activity")
|
||||
@Data @Entity
|
||||
@JsonPropertyOrder("kind", "id", "sortNumber", "param1", "param2", "param3", "param4")
|
||||
class Mai2UserAct : Mai2UserEntity() {
|
||||
var kind = 0
|
||||
|
||||
@JsonProperty("id")
|
||||
var activityId = 0
|
||||
|
||||
var sortNumber: Long = 0
|
||||
var param1 = 0
|
||||
var param2 = 0
|
||||
var param3 = 0
|
||||
var param4 = 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_card")
|
||||
@Data @Entity
|
||||
class Mai2UserCard : Mai2UserEntity() {
|
||||
var cardId: Int = 0
|
||||
var cardTypeId: Int = 0
|
||||
var charaId: Int = 0
|
||||
var mapId: Int = 0
|
||||
var startDate: String? = null
|
||||
var endDate: String? = null
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_character")
|
||||
@Data @Entity
|
||||
class Mai2UserCharacter : Mai2UserEntity() {
|
||||
var characterId = 0
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var point = 0
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var count = 0
|
||||
var level = 0
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var nextAwake = 0
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var nextAwakePercent = 0
|
||||
|
||||
@JsonInclude
|
||||
@Transient
|
||||
var favorite = false
|
||||
var awakening = 0
|
||||
var useCount = 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_charge", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "charge_id"])])
|
||||
@Data @Entity
|
||||
@JsonPropertyOrder("chargeId", "stock", "purchaseDate", "validDate")
|
||||
class Mai2UserCharge : Mai2UserEntity() {
|
||||
@Column(name = "charge_id")
|
||||
var chargeId = 0
|
||||
var stock = 0
|
||||
var purchaseDate: String? = null
|
||||
var validDate: String? = null
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_course")
|
||||
@Data @Entity
|
||||
class Mai2UserCourse : Mai2UserEntity() {
|
||||
var courseId = 0
|
||||
|
||||
@JsonProperty("isLastClear")
|
||||
var isLastClear = false
|
||||
var totalRestlife = 0
|
||||
var totalAchievement = 0
|
||||
var totalDeluxscore = 0
|
||||
var playCount = 0
|
||||
var clearDate: String? = null
|
||||
var lastPlayDate: String? = null
|
||||
var bestAchievement = 0
|
||||
var bestAchievementDate: String? = null
|
||||
var bestDeluxscore = 0
|
||||
var bestDeluxscoreDate: String? = null
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_extend")
|
||||
@Data @Entity
|
||||
@JsonPropertyOrder(
|
||||
"selectMusicId",
|
||||
"selectDifficultyId",
|
||||
"categoryIndex",
|
||||
"musicIndex",
|
||||
"extraFlag",
|
||||
"selectScoreType",
|
||||
"extendContentBit",
|
||||
"isPhotoAgree",
|
||||
"isGotoCodeRead",
|
||||
"selectResultDetails",
|
||||
"sortCategorySetting",
|
||||
"sortMusicSetting",
|
||||
"playStatusSetting",
|
||||
"selectedCardList",
|
||||
"encountMapNpcList"
|
||||
)
|
||||
class Mai2UserExtend : Mai2UserEntity() {
|
||||
var selectMusicId = 0
|
||||
var selectDifficultyId = 0
|
||||
var categoryIndex = 0
|
||||
var musicIndex = 0
|
||||
var extraFlag = 0
|
||||
var selectScoreType = 0
|
||||
var extendContentBit: Long = 0
|
||||
|
||||
@JsonProperty("isPhotoAgree")
|
||||
var isPhotoAgree = false
|
||||
|
||||
@JsonProperty("isGotoCodeRead")
|
||||
var isGotoCodeRead = false
|
||||
var selectResultDetails = false
|
||||
var sortCategorySetting = 0 //enum SortTabID
|
||||
var sortMusicSetting = 0 //enum SortMusicID
|
||||
var playStatusSetting = 0 //enum PlaystatusTabID
|
||||
var selectResultScoreViewType = 0
|
||||
|
||||
@Convert(converter = IntegerListConverter::class)
|
||||
var selectedCardList: List<Int>? = null
|
||||
|
||||
@OneToMany(mappedBy = "userExtend")
|
||||
var encountMapNpcList: List<Mai2MapEncountNpc> = ArrayList()
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_favorite")
|
||||
@Data @Entity
|
||||
class Mai2UserFavorite : Mai2UserEntity() {
|
||||
@JsonProperty("userId")
|
||||
var favUserId: Long = 0
|
||||
var itemKind = 0
|
||||
|
||||
@Convert(converter = IntegerListConverter::class)
|
||||
var itemIdList: List<Int>? = null
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_friend_season_ranking")
|
||||
@Data @Entity
|
||||
class Mai2UserFriendSeasonRanking : Mai2UserEntity() {
|
||||
var seasonId = 0
|
||||
var point = 0
|
||||
|
||||
@Column(name = "\"rank\"")
|
||||
var rank = 0
|
||||
var rewardGet = false
|
||||
var userName: String? = null
|
||||
var recordDate: String? = null
|
||||
}
|
||||
|
||||
/**
|
||||
* This is for storing some data only use in aqua
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Table(name = "maimai2_user_general_data")
|
||||
@Data @Entity
|
||||
class Mai2UserGeneralData : Mai2UserEntity() {
|
||||
var propertyKey = ""
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
var propertyValue = ""
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
class Mai2UserGhost {
|
||||
var name: String? = null
|
||||
var iconId = 0
|
||||
var plateId = 0
|
||||
var titleId = 0
|
||||
var rate = 0
|
||||
var udemaeRate = 0
|
||||
var courseRank = 0
|
||||
var classRank = 0
|
||||
var classValue = 0
|
||||
var playDatetime: String? = null
|
||||
var shopId = 0
|
||||
var regionCode = 0
|
||||
var typeId = 0
|
||||
var musicId = 0
|
||||
var difficulty = 0
|
||||
var version = 0
|
||||
var resultBitList: List<Byte>? = null
|
||||
var resultNum = 0
|
||||
var achievement = 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_item")
|
||||
@Data @Entity
|
||||
class Mai2UserItem : Mai2UserEntity() {
|
||||
var itemKind = 0
|
||||
var itemId = 0
|
||||
var stock = 0
|
||||
var isValid = false
|
||||
}
|
||||
|
||||
@Suppress("EnumEntryName")
|
||||
enum class Mai2ItemKind(val id: Int) {
|
||||
plate(1),
|
||||
title(2),
|
||||
icon(3),
|
||||
musicUnlock(5),
|
||||
musicMasterUnlock(6),
|
||||
musicRemasterUnlock(7),
|
||||
musicStrongUnlock(8),
|
||||
chara(9),
|
||||
partner(10),
|
||||
frame(11),
|
||||
ticket(12);
|
||||
|
||||
companion object {
|
||||
val ALL: Map<Int, Mai2ItemKind> = Mai2ItemKind::class.java.enumConstants.associateBy { it.id }
|
||||
}
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_login_bonus")
|
||||
@Data @Entity
|
||||
@JsonPropertyOrder("bonusId", "point", "isCurrent", "isComplete")
|
||||
class Mai2UserLoginBonus : Mai2UserEntity() {
|
||||
var bonusId = 0
|
||||
var point = 0
|
||||
|
||||
@JsonProperty("isCurrent")
|
||||
var isCurrent = false
|
||||
|
||||
@JsonProperty("isComplete")
|
||||
var isComplete = false
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_map")
|
||||
@Data @Entity
|
||||
@JsonPropertyOrder("mapId", "distance", "isLock", "isClear", "isComplete")
|
||||
class Mai2UserMap : Mai2UserEntity() {
|
||||
var mapId = 0
|
||||
var distance = 0
|
||||
|
||||
@JsonProperty("isLock")
|
||||
var isLock = false
|
||||
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
|
||||
@JsonProperty("isComplete")
|
||||
var isComplete = false
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_music_detail")
|
||||
@Data @Entity
|
||||
class Mai2UserMusicDetail : Mai2UserEntity() {
|
||||
|
||||
var musicId = 0
|
||||
var level = 0
|
||||
var playCount = 0
|
||||
var achievement = 0
|
||||
var comboStatus = 0
|
||||
var syncStatus = 0
|
||||
var deluxscoreMax = 0
|
||||
var scoreRank = 0
|
||||
var extNum1 = 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_option")
|
||||
@Data @Entity
|
||||
class Mai2UserOption : Mai2UserEntity() {
|
||||
var optionKind = 0
|
||||
var noteSpeed = 0
|
||||
var slideSpeed = 0
|
||||
var touchSpeed = 0
|
||||
var tapDesign = 0
|
||||
var holdDesign = 0
|
||||
var slideDesign = 0
|
||||
var starType = 0
|
||||
var outlineDesign = 0
|
||||
var noteSize = 0
|
||||
var slideSize = 0
|
||||
var touchSize = 0
|
||||
var starRotate = 0
|
||||
var dispCenter = 0
|
||||
var dispChain = 0
|
||||
var dispRate = 0
|
||||
var dispBar = 0
|
||||
var touchEffect = 0
|
||||
var submonitorAnimation = 0
|
||||
var submonitorAchive = 0
|
||||
var submonitorAppeal = 0
|
||||
var matching = 0
|
||||
var trackSkip = 0
|
||||
var brightness = 0
|
||||
var mirrorMode = 0
|
||||
var dispJudge = 0
|
||||
var dispJudgePos = 0
|
||||
var dispJudgeTouchPos = 0
|
||||
var adjustTiming = 0
|
||||
var judgeTiming = 0
|
||||
var ansVolume = 0
|
||||
var tapHoldVolume = 0
|
||||
var criticalSe = 0
|
||||
var tapSe = 0
|
||||
var breakSe = 0
|
||||
var breakVolume = 0
|
||||
var exSe = 0
|
||||
var exVolume = 0
|
||||
var slideSe = 0
|
||||
var slideVolume = 0
|
||||
var touchHoldVolume = 0
|
||||
var damageSeVolume = 0
|
||||
var headPhoneVolume = 0
|
||||
var sortTab = 0
|
||||
var sortMusic = 0
|
||||
var outFrameType = 0
|
||||
var breakSlideVolume = 0
|
||||
var touchVolume = 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_playlog")
|
||||
@Data @Entity
|
||||
class Mai2UserPlaylog : Mai2UserEntity(), IGenericGamePlaylog {
|
||||
var orderId = 0
|
||||
var playlogId: Long = 0
|
||||
var version = 0
|
||||
var placeId = 0
|
||||
var placeName: String? = null
|
||||
var loginDate: Long = 0
|
||||
var playDate: String = ""
|
||||
override var userPlayDate: String = ""
|
||||
var type = 0
|
||||
override var musicId: Int = 0
|
||||
override var level: Int = 0
|
||||
var trackNo = 0
|
||||
var vsMode = 0
|
||||
var vsUserName: String? = null
|
||||
var vsStatus = 0
|
||||
var vsUserRating = 0
|
||||
var vsUserAchievement = 0
|
||||
var vsUserGradeRank = 0
|
||||
var vsRank = 0
|
||||
var playerNum = 0
|
||||
var playedUserId1: Long = 0
|
||||
var playedUserName1: String? = null
|
||||
var playedMusicLevel1 = 0
|
||||
var playedUserId2: Long = 0
|
||||
var playedUserName2: String? = null
|
||||
var playedMusicLevel2 = 0
|
||||
var playedUserId3: Long = 0
|
||||
var playedUserName3: String? = null
|
||||
var playedMusicLevel3 = 0
|
||||
var characterId1 = 0
|
||||
var characterLevel1 = 0
|
||||
var characterAwakening1 = 0
|
||||
var characterId2 = 0
|
||||
var characterLevel2 = 0
|
||||
var characterAwakening2 = 0
|
||||
var characterId3 = 0
|
||||
var characterLevel3 = 0
|
||||
var characterAwakening3 = 0
|
||||
var characterId4 = 0
|
||||
var characterLevel4 = 0
|
||||
var characterAwakening4 = 0
|
||||
var characterId5 = 0
|
||||
var characterLevel5 = 0
|
||||
var characterAwakening5 = 0
|
||||
override var achievement: Int = 0
|
||||
var deluxscore = 0
|
||||
var scoreRank = 0
|
||||
|
||||
// Maximum continuous combo that the player achieved in this play.
|
||||
override var maxCombo: Int = 0
|
||||
|
||||
// Maximum achievable combo in the song.
|
||||
var totalCombo = 0
|
||||
var maxSync = 0
|
||||
var totalSync = 0
|
||||
var tapCriticalPerfect = 0
|
||||
var tapPerfect = 0
|
||||
var tapGreat = 0
|
||||
var tapGood = 0
|
||||
var tapMiss = 0
|
||||
var holdCriticalPerfect = 0
|
||||
var holdPerfect = 0
|
||||
var holdGreat = 0
|
||||
var holdGood = 0
|
||||
var holdMiss = 0
|
||||
var slideCriticalPerfect = 0
|
||||
var slidePerfect = 0
|
||||
var slideGreat = 0
|
||||
var slideGood = 0
|
||||
var slideMiss = 0
|
||||
var touchCriticalPerfect = 0
|
||||
var touchPerfect = 0
|
||||
var touchGreat = 0
|
||||
var touchGood = 0
|
||||
var touchMiss = 0
|
||||
var breakCriticalPerfect = 0
|
||||
var breakPerfect = 0
|
||||
var breakGreat = 0
|
||||
var breakGood = 0
|
||||
var breakMiss = 0
|
||||
|
||||
@JsonProperty("isTap")
|
||||
var isTap = false
|
||||
|
||||
@JsonProperty("isHold")
|
||||
var isHold = false
|
||||
|
||||
@JsonProperty("isSlide")
|
||||
var isSlide = false
|
||||
|
||||
@JsonProperty("isTouch")
|
||||
var isTouch = false
|
||||
|
||||
@JsonProperty("isBreak")
|
||||
var isBreak = false
|
||||
|
||||
@JsonProperty("isCriticalDisp")
|
||||
var isCriticalDisp = false
|
||||
|
||||
@JsonProperty("isFastLateDisp")
|
||||
var isFastLateDisp = false
|
||||
var fastCount = 0
|
||||
var lateCount = 0
|
||||
|
||||
@JsonProperty("isAchieveNewRecord")
|
||||
var isAchieveNewRecord = false
|
||||
|
||||
@JsonProperty("isDeluxscoreNewRecord")
|
||||
var isDeluxscoreNewRecord = false
|
||||
var comboStatus = 0
|
||||
var syncStatus = 0
|
||||
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
override var beforeRating: Int = 0
|
||||
override var afterRating: Int = 0
|
||||
var beforeGrade = 0
|
||||
var afterGrade = 0
|
||||
var afterGradeRank = 0
|
||||
var beforeDeluxRating = 0
|
||||
var afterDeluxRating = 0
|
||||
|
||||
@JsonProperty("isPlayTutorial")
|
||||
var isPlayTutorial = false
|
||||
|
||||
@JsonProperty("isEventMode")
|
||||
var isEventMode = false
|
||||
|
||||
@JsonProperty("isFreedomMode")
|
||||
var isFreedomMode = false
|
||||
var playMode = 0
|
||||
|
||||
@JsonProperty("isNewFree")
|
||||
var isNewFree = false
|
||||
|
||||
var trialPlayAchievement = 0
|
||||
var extNum1 = 0
|
||||
var extNum2 = 0
|
||||
var extNum4 = 0
|
||||
|
||||
@JsonProperty("extBool1")
|
||||
var extBool1 = false
|
||||
|
||||
override val isFullCombo: Boolean
|
||||
get() = maxCombo == totalCombo
|
||||
|
||||
override val isAllPerfect: Boolean
|
||||
get() = tapMiss + tapGood + tapGreat == 0 &&
|
||||
holdMiss + holdGood + holdGreat == 0 &&
|
||||
slideMiss + slideGood + slideGreat == 0 &&
|
||||
touchMiss + touchGood + touchGreat == 0 &&
|
||||
breakMiss + breakGood + breakGreat == 0
|
||||
}
|
||||
|
||||
@Table(name = "maimai2_user_print_detail")
|
||||
@Data @Entity
|
||||
class Mai2UserPrintDetail : Mai2UserEntity() {
|
||||
var orderId: Long = 0
|
||||
var printNumber = 0
|
||||
var printDate: String? = null
|
||||
var serialId: String? = null
|
||||
var placeId = 0
|
||||
var clientId: String? = null
|
||||
var printerSerialId: String? = null
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_card_id")
|
||||
var userCard: Mai2UserCard? = null
|
||||
var cardRomVersion = 0
|
||||
var isHolograph = false
|
||||
var printOption1 = false
|
||||
var printOption2 = false
|
||||
var printOption3 = false
|
||||
var printOption4 = false
|
||||
var printOption5 = false
|
||||
var printOption6 = false
|
||||
var printOption7 = false
|
||||
var printOption8 = false
|
||||
var printOption9 = false
|
||||
var printOption10 = false
|
||||
var created: String? = null
|
||||
}
|
||||
|
||||
data class Mai2UserRate(
|
||||
var musicId: Int = 0,
|
||||
var level: Int = 0,
|
||||
var romVersion: Int = 0,
|
||||
var achievement: Int = 0,
|
||||
)
|
||||
|
||||
@Table(name = "maimai2_user_udemae")
|
||||
@Data @Entity
|
||||
class Mai2UserUdemae : Mai2UserEntity() {
|
||||
var rate = 0
|
||||
var maxRate = 0
|
||||
var classValue = 0
|
||||
var maxClassValue = 0
|
||||
var totalWinNum = 0
|
||||
var totalLoseNum = 0
|
||||
var maxWinNum = 0
|
||||
var maxLoseNum = 0
|
||||
var winNum = 0
|
||||
var loseNum = 0
|
||||
var npcTotalWinNum = 0
|
||||
var npcTotalLoseNum = 0
|
||||
var npcMaxWinNum = 0
|
||||
var npcMaxLoseNum = 0
|
||||
var npcWinNum = 0
|
||||
var npcLoseNum = 0
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.util.IntegerListConverter;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserExtend")
|
||||
@Table(name = "maimai2_user_extend")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonPropertyOrder({"selectMusicId", "selectDifficultyId", "categoryIndex", "musicIndex",
|
||||
"extraFlag", "selectScoreType", "extendContentBit", "isPhotoAgree", "isGotoCodeRead",
|
||||
"selectResultDetails", "sortCategorySetting", "sortMusicSetting", "playStatusSetting", "selectedCardList", "encountMapNpcList"})
|
||||
public class UserExtend implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int selectMusicId;
|
||||
private int selectDifficultyId;
|
||||
private int categoryIndex;
|
||||
private int musicIndex;
|
||||
private int extraFlag;
|
||||
private int selectScoreType;
|
||||
private long extendContentBit;
|
||||
@JsonProperty("isPhotoAgree")
|
||||
private boolean isPhotoAgree;
|
||||
@JsonProperty("isGotoCodeRead")
|
||||
private boolean isGotoCodeRead;
|
||||
private boolean selectResultDetails;
|
||||
private int sortCategorySetting; //enum SortTabID
|
||||
private int sortMusicSetting; //enum SortMusicID
|
||||
private int playStatusSetting; //enum PlaystatusTabID
|
||||
private int selectResultScoreViewType;
|
||||
|
||||
@Convert(converter = IntegerListConverter.class)
|
||||
private List<Integer> selectedCardList;
|
||||
|
||||
@OneToMany(mappedBy = "userExtend")
|
||||
private List<MapEncountNpc> encountMapNpcList = new ArrayList<>();
|
||||
|
||||
public UserExtend(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import icu.samnyan.aqua.sega.maimai2.util.IntegerListConverter;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserFavorite")
|
||||
@Table(name = "maimai2_user_favorite")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserFavorite implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
@JsonProperty("userId")
|
||||
private long favUserId;
|
||||
private int itemKind;
|
||||
|
||||
@Convert(converter = IntegerListConverter.class)
|
||||
private List<Integer> itemIdList;
|
||||
|
||||
public UserFavorite(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserFriendSeasonRanking")
|
||||
@Table(name = "maimai2_user_friend_season_ranking")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserFriendSeasonRanking implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int seasonId;
|
||||
private int point;
|
||||
@Column(name = "\"rank\"")
|
||||
private int rank;
|
||||
private boolean rewardGet;
|
||||
private String userName;
|
||||
private String recordDate;
|
||||
|
||||
public UserFriendSeasonRanking(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* This is for storing some data only use in aqua
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserGeneralData")
|
||||
@Table(name = "maimai2_user_general_data")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserGeneralData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private String propertyKey;
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String propertyValue;
|
||||
|
||||
public UserGeneralData(UserDetail userData, String key) {
|
||||
this.user = userData;
|
||||
this.propertyKey = key;
|
||||
this.propertyValue = "";
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserGhost {
|
||||
private String name;
|
||||
private int iconId;
|
||||
private int plateId;
|
||||
private int titleId;
|
||||
private int rate;
|
||||
private int udemaeRate;
|
||||
private int courseRank;
|
||||
private int classRank;
|
||||
private int classValue;
|
||||
private String playDatetime;
|
||||
private int shopId;
|
||||
private int regionCode;
|
||||
private int typeId;
|
||||
private int musicId;
|
||||
private int difficulty;
|
||||
private int version;
|
||||
private List<Byte> resultBitList;
|
||||
private int resultNum;
|
||||
private int achievement;
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserItem")
|
||||
@Table(name = "maimai2_user_item")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserItem implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int itemKind;
|
||||
private int itemId;
|
||||
private int stock;
|
||||
private boolean isValid;
|
||||
|
||||
public UserItem(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
public enum Mai2ItemKind {
|
||||
plate(1),
|
||||
title(2),
|
||||
icon(3),
|
||||
musicUnlock(5),
|
||||
musicMasterUnlock(6),
|
||||
musicRemasterUnlock(7),
|
||||
musicStrongUnlock(8),
|
||||
chara(9),
|
||||
partner(10),
|
||||
frame(11),
|
||||
ticket(12);
|
||||
|
||||
public final int value;
|
||||
|
||||
Mai2ItemKind(int value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public static final Map<Integer, Mai2ItemKind> ALL = Arrays.stream(Mai2ItemKind.class.getEnumConstants())
|
||||
.map(k -> Map.entry(k.value, k)).collect(HashMap::new, (m, v) -> m.put(v.getKey(), v.getValue()), Map::putAll);
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserLoginBonus")
|
||||
@Table(name = "maimai2_user_login_bonus")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonPropertyOrder({"bonusId", "point", "isCurrent", "isComplete"})
|
||||
public class UserLoginBonus implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int bonusId;
|
||||
private int point;
|
||||
@JsonProperty("isCurrent")
|
||||
private boolean isCurrent;
|
||||
@JsonProperty("isComplete")
|
||||
private boolean isComplete;
|
||||
|
||||
public UserLoginBonus(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserMap")
|
||||
@Table(name = "maimai2_user_map")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@JsonPropertyOrder({"mapId", "distance", "isLock", "isClear", "isComplete"})
|
||||
public class UserMap implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int mapId;
|
||||
private int distance;
|
||||
@JsonProperty("isLock")
|
||||
private boolean isLock;
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
@JsonProperty("isComplete")
|
||||
private boolean isComplete;
|
||||
|
||||
public UserMap(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "MaiMai2UserMusicDetail")
|
||||
@Table(name = "maimai2_user_music_detail")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserMusicDetail implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int musicId;
|
||||
private int level;
|
||||
private int playCount;
|
||||
private int achievement;
|
||||
private int comboStatus;
|
||||
private int syncStatus;
|
||||
private int deluxscoreMax;
|
||||
private int scoreRank;
|
||||
private int extNum1;
|
||||
|
||||
public UserMusicDetail(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserOption")
|
||||
@Table(name = "maimai2_user_option")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserOption implements Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int optionKind;
|
||||
private int noteSpeed;
|
||||
private int slideSpeed;
|
||||
private int touchSpeed;
|
||||
private int tapDesign;
|
||||
private int holdDesign;
|
||||
private int slideDesign;
|
||||
private int starType;
|
||||
private int outlineDesign;
|
||||
private int noteSize;
|
||||
private int slideSize;
|
||||
private int touchSize;
|
||||
private int starRotate;
|
||||
private int dispCenter;
|
||||
private int dispChain;
|
||||
private int dispRate;
|
||||
private int dispBar;
|
||||
private int touchEffect;
|
||||
private int submonitorAnimation;
|
||||
private int submonitorAchive;
|
||||
private int submonitorAppeal;
|
||||
private int matching;
|
||||
private int trackSkip;
|
||||
private int brightness;
|
||||
private int mirrorMode;
|
||||
private int dispJudge;
|
||||
private int dispJudgePos;
|
||||
private int dispJudgeTouchPos;
|
||||
private int adjustTiming;
|
||||
private int judgeTiming;
|
||||
private int ansVolume;
|
||||
private int tapHoldVolume;
|
||||
private int criticalSe;
|
||||
private int tapSe;
|
||||
private int breakSe;
|
||||
private int breakVolume;
|
||||
private int exSe;
|
||||
private int exVolume;
|
||||
private int slideSe;
|
||||
private int slideVolume;
|
||||
private int touchHoldVolume;
|
||||
private int damageSeVolume;
|
||||
private int headPhoneVolume;
|
||||
private int sortTab;
|
||||
private int sortMusic;
|
||||
private int outFrameType;
|
||||
private int breakSlideVolume;
|
||||
private int touchVolume;
|
||||
|
||||
public UserOption(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,279 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import icu.samnyan.aqua.net.games.IGenericGamePlaylog;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserPlaylog")
|
||||
@Table(name = "maimai2_user_playlog")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserPlaylog implements Serializable, IGenericGamePlaylog {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int orderId;
|
||||
|
||||
private long playlogId;
|
||||
|
||||
private int version;
|
||||
|
||||
private int placeId;
|
||||
|
||||
private String placeName;
|
||||
|
||||
private long loginDate;
|
||||
|
||||
private String playDate;
|
||||
|
||||
private String userPlayDate;
|
||||
|
||||
private int type;
|
||||
|
||||
private int musicId;
|
||||
|
||||
private int level;
|
||||
|
||||
private int trackNo;
|
||||
|
||||
private int vsMode;
|
||||
|
||||
private String vsUserName;
|
||||
|
||||
private int vsStatus;
|
||||
|
||||
private int vsUserRating;
|
||||
|
||||
private int vsUserAchievement;
|
||||
|
||||
private int vsUserGradeRank;
|
||||
|
||||
private int vsRank;
|
||||
|
||||
private int playerNum;
|
||||
|
||||
private long playedUserId1;
|
||||
|
||||
private String playedUserName1;
|
||||
|
||||
private int playedMusicLevel1;
|
||||
|
||||
private long playedUserId2;
|
||||
|
||||
private String playedUserName2;
|
||||
|
||||
private int playedMusicLevel2;
|
||||
|
||||
private long playedUserId3;
|
||||
|
||||
private String playedUserName3;
|
||||
|
||||
private int playedMusicLevel3;
|
||||
|
||||
private int characterId1;
|
||||
|
||||
private int characterLevel1;
|
||||
|
||||
private int characterAwakening1;
|
||||
|
||||
private int characterId2;
|
||||
|
||||
private int characterLevel2;
|
||||
|
||||
private int characterAwakening2;
|
||||
|
||||
private int characterId3;
|
||||
|
||||
private int characterLevel3;
|
||||
|
||||
private int characterAwakening3;
|
||||
|
||||
private int characterId4;
|
||||
|
||||
private int characterLevel4;
|
||||
|
||||
private int characterAwakening4;
|
||||
|
||||
private int characterId5;
|
||||
|
||||
private int characterLevel5;
|
||||
|
||||
private int characterAwakening5;
|
||||
|
||||
private int achievement;
|
||||
|
||||
private int deluxscore;
|
||||
|
||||
private int scoreRank;
|
||||
|
||||
// Maximum continuous combo that the player achieved in this play.
|
||||
private int maxCombo;
|
||||
|
||||
// Maximum achievable combo in the song.
|
||||
private int totalCombo;
|
||||
|
||||
private int maxSync;
|
||||
|
||||
private int totalSync;
|
||||
|
||||
private int tapCriticalPerfect;
|
||||
|
||||
private int tapPerfect;
|
||||
|
||||
private int tapGreat;
|
||||
|
||||
private int tapGood;
|
||||
|
||||
private int tapMiss;
|
||||
|
||||
private int holdCriticalPerfect;
|
||||
|
||||
private int holdPerfect;
|
||||
|
||||
private int holdGreat;
|
||||
|
||||
private int holdGood;
|
||||
|
||||
private int holdMiss;
|
||||
|
||||
private int slideCriticalPerfect;
|
||||
|
||||
private int slidePerfect;
|
||||
|
||||
private int slideGreat;
|
||||
|
||||
private int slideGood;
|
||||
|
||||
private int slideMiss;
|
||||
|
||||
private int touchCriticalPerfect;
|
||||
|
||||
private int touchPerfect;
|
||||
|
||||
private int touchGreat;
|
||||
|
||||
private int touchGood;
|
||||
|
||||
private int touchMiss;
|
||||
|
||||
private int breakCriticalPerfect;
|
||||
|
||||
private int breakPerfect;
|
||||
|
||||
private int breakGreat;
|
||||
|
||||
private int breakGood;
|
||||
|
||||
private int breakMiss;
|
||||
|
||||
@JsonProperty("isTap")
|
||||
private boolean isTap;
|
||||
|
||||
@JsonProperty("isHold")
|
||||
private boolean isHold;
|
||||
|
||||
@JsonProperty("isSlide")
|
||||
private boolean isSlide;
|
||||
|
||||
@JsonProperty("isTouch")
|
||||
private boolean isTouch;
|
||||
|
||||
@JsonProperty("isBreak")
|
||||
private boolean isBreak;
|
||||
|
||||
@JsonProperty("isCriticalDisp")
|
||||
private boolean isCriticalDisp;
|
||||
|
||||
@JsonProperty("isFastLateDisp")
|
||||
private boolean isFastLateDisp;
|
||||
|
||||
private int fastCount;
|
||||
|
||||
private int lateCount;
|
||||
|
||||
@JsonProperty("isAchieveNewRecord")
|
||||
private boolean isAchieveNewRecord;
|
||||
|
||||
@JsonProperty("isDeluxscoreNewRecord")
|
||||
private boolean isDeluxscoreNewRecord;
|
||||
|
||||
private int comboStatus;
|
||||
|
||||
private int syncStatus;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private int beforeRating;
|
||||
|
||||
private int afterRating;
|
||||
|
||||
private int beforeGrade;
|
||||
|
||||
private int afterGrade;
|
||||
|
||||
private int afterGradeRank;
|
||||
|
||||
private int beforeDeluxRating;
|
||||
|
||||
private int afterDeluxRating;
|
||||
|
||||
@JsonProperty("isPlayTutorial")
|
||||
private boolean isPlayTutorial;
|
||||
|
||||
@JsonProperty("isEventMode")
|
||||
private boolean isEventMode;
|
||||
|
||||
@JsonProperty("isFreedomMode")
|
||||
private boolean isFreedomMode;
|
||||
|
||||
private int playMode;
|
||||
|
||||
@JsonProperty("isNewFree")
|
||||
private boolean isNewFree;
|
||||
|
||||
private int trialPlayAchievement;
|
||||
|
||||
private int extNum1;
|
||||
|
||||
private int extNum2;
|
||||
|
||||
private int extNum4;
|
||||
|
||||
@JsonProperty("extBool1")
|
||||
private boolean extBool1;
|
||||
|
||||
@Override
|
||||
public boolean isFullCombo() {
|
||||
return maxCombo == totalCombo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllPerfect() {
|
||||
return tapMiss + tapGood + tapGreat == 0
|
||||
&& holdMiss + holdGood + holdGreat == 0
|
||||
&& slideMiss + slideGood + slideGreat == 0
|
||||
&& touchMiss + touchGood + touchGreat == 0
|
||||
&& breakMiss + breakGood + breakGreat == 0;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserPrintDetail")
|
||||
@Table(name = "maimai2_user_print_detail")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserPrintDetail implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
private long orderId;
|
||||
private int printNumber;
|
||||
private String printDate;
|
||||
private String serialId;
|
||||
private int placeId;
|
||||
private String clientId;
|
||||
private String printerSerialId;
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_card_id")
|
||||
private UserCard userCard;
|
||||
private int cardRomVersion;
|
||||
private boolean isHolograph;
|
||||
private boolean printOption1;
|
||||
private boolean printOption2;
|
||||
private boolean printOption3;
|
||||
private boolean printOption4;
|
||||
private boolean printOption5;
|
||||
private boolean printOption6;
|
||||
private boolean printOption7;
|
||||
private boolean printOption8;
|
||||
private boolean printOption9;
|
||||
private boolean printOption10;
|
||||
private String created;
|
||||
|
||||
public UserPrintDetail(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserRate {
|
||||
private int musicId;
|
||||
private int level;
|
||||
private int romVersion;
|
||||
private int achievement;
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.maimai2.model.userdata;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "Maimai2UserUdemae")
|
||||
@Table(name = "maimai2_user_udemae")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserUdemae implements Serializable {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserDetail user;
|
||||
|
||||
private int rate;
|
||||
private int maxRate;
|
||||
private int classValue;
|
||||
private int maxClassValue;
|
||||
private int totalWinNum;
|
||||
private int totalLoseNum;
|
||||
private int maxWinNum;
|
||||
private int maxLoseNum;
|
||||
private int winNum;
|
||||
private int loseNum;
|
||||
private int npcTotalWinNum;
|
||||
private int npcTotalLoseNum;
|
||||
private int npcMaxWinNum;
|
||||
private int npcMaxLoseNum;
|
||||
private int npcWinNum;
|
||||
private int npcLoseNum;
|
||||
|
||||
public UserUdemae(UserDetail user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user