mirror of
https://github.com/MewoLab/AquaDX.git
synced 2025-10-25 12:02:40 +00:00
[O] DB > kt
This commit is contained in:
parent
3a54798d5f
commit
8e5827eeaf
@ -3,8 +3,22 @@ package icu.samnyan.aqua.sega.diva
|
||||
import ext.invoke
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.*
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.*
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.DivaCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.DivaModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Festa
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Pv
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayLog
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerInventory
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerScreenShot
|
||||
import icu.samnyan.aqua.sega.diva.util.ProfileNotFoundException
|
||||
import icu.samnyan.aqua.sega.diva.util.SessionNotFoundException
|
||||
import org.springframework.data.jpa.repository.JpaRepository
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
package icu.samnyan.aqua.sega.diva
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.RegistrationRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerModule
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.stereotype.Service
|
||||
|
||||
@ -5,7 +5,7 @@ import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import icu.samnyan.aqua.sega.diva.model.request.card.CardProcedureRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.card.CardProcedureResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.ContestInfoResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
@ -20,7 +20,7 @@ class ContestInfoHandler(val db: DivaRepos) {
|
||||
var ci_str = "***"
|
||||
if (!contestList.isEmpty()) {
|
||||
val sb = StringBuilder()
|
||||
contestList.forEach(Consumer { x: Contest? -> sb.append(encode(x!!.getString())).append(",") })
|
||||
contestList.forEach(Consumer { x: Contest? -> sb.append(encode(x!!.string)).append(",") })
|
||||
sb.append("%2A%2A%2A,".repeat(max(0, 8 - contestList.size)))
|
||||
sb.deleteCharAt(sb.length - 1)
|
||||
ci_str = sb.toString()
|
||||
|
||||
@ -60,21 +60,9 @@ class PsRankingHandler(val db: DivaRepos) {
|
||||
score1.add(obj.first.maxScore)
|
||||
score2.add(obj.second.maxScore)
|
||||
score3.add(obj.third.maxScore)
|
||||
name1.add(
|
||||
encode(
|
||||
if (obj.first.pdId != null) obj.first.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name2.add(
|
||||
encode(
|
||||
if (obj.second.pdId != null) obj.second.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name3.add(
|
||||
encode(
|
||||
if (obj.third.pdId != null) obj.third.pdId.playerName else "xxx"
|
||||
)
|
||||
)
|
||||
name1.add(encode(obj.first.pdId?.playerName ?: "xxx"))
|
||||
name2.add(encode(obj.second.pdId?.playerName ?: "xxx"))
|
||||
name3.add(encode(obj.third.pdId?.playerName ?: "xxx"))
|
||||
}
|
||||
|
||||
return PsRankingResponse(
|
||||
|
||||
@ -2,7 +2,7 @@ package icu.samnyan.aqua.sega.diva.handler.databank
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.PvEntry
|
||||
import icu.samnyan.aqua.sega.diva.model.request.BaseRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.databank.PvListResponse
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
|
||||
@ -5,8 +5,8 @@ import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.GetPvPdRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.GetPvPdResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder.encode
|
||||
import org.springframework.stereotype.Component
|
||||
|
||||
@ -5,7 +5,7 @@ import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Result
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.ShopExitRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.ShopExitResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvCustomize
|
||||
import org.springframework.stereotype.Component
|
||||
import java.util.function.Supplier
|
||||
|
||||
|
||||
@ -3,9 +3,13 @@ package icu.samnyan.aqua.sega.diva.handler.ingame
|
||||
import ext.logger
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayLog
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerCustomize
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerInventory
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.ingame.StageResultResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.*
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaCalculator
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
@ -242,7 +246,7 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
}
|
||||
}
|
||||
|
||||
private fun getLog(request: StageResultRequest, profile: PlayerProfile?, i: Int): PlayLog {
|
||||
private fun getLog(request: StageResultRequest, profile: PlayerProfile, i: Int): PlayLog {
|
||||
return PlayLog(
|
||||
profile,
|
||||
request.getStg_ply_pv_id()[i],
|
||||
@ -363,9 +367,8 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.inventory.save(
|
||||
PlayerInventory(
|
||||
null,
|
||||
currentProfile,
|
||||
rewardValue[1],
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!,
|
||||
"SKIN"
|
||||
)
|
||||
)
|
||||
@ -387,9 +390,8 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.inventory.save(
|
||||
PlayerInventory(
|
||||
null,
|
||||
currentProfile,
|
||||
rewardValue[1],
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!,
|
||||
"PLATE"
|
||||
)
|
||||
)
|
||||
@ -411,7 +413,7 @@ class StageResultHandler(val db: DivaRepos, val calc: DivaCalculator) {
|
||||
} else {
|
||||
db.customize.save(
|
||||
PlayerCustomize(
|
||||
currentProfile,
|
||||
currentProfile!!,
|
||||
rewardValue[1]!!.toInt()
|
||||
)
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@ import icu.samnyan.aqua.sega.diva.DIVA_BAD
|
||||
import icu.samnyan.aqua.sega.diva.DIVA_OK
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StoreSsRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerScreenShot
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerScreenShot
|
||||
import org.springframework.stereotype.Component
|
||||
import org.springframework.web.multipart.MultipartFile
|
||||
import java.io.IOException
|
||||
|
||||
@ -6,9 +6,9 @@ import icu.samnyan.aqua.sega.diva.model.common.ContestBorder
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.common.SortMode
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Contest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.request.ingame.StageResultRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaStringUtils
|
||||
import org.springframework.stereotype.Component
|
||||
import java.lang.String
|
||||
@ -27,7 +27,7 @@ class EndHandler(val db: DivaRepos) {
|
||||
val (profile, session) = db.session(request.pd_id)
|
||||
|
||||
profile.headphoneVolume = request.getHp_vol()
|
||||
profile.isButtonSeOn = request.isBtn_se_vol
|
||||
profile.buttonSeOn = request.isBtn_se_vol
|
||||
profile.buttonSeVolume = request.getBtn_se_vol2()
|
||||
profile.sliderSeVolume = request.getSldr_se_vol2()
|
||||
profile.vocaloidPoints = session.vp
|
||||
@ -43,7 +43,7 @@ class EndHandler(val db: DivaRepos) {
|
||||
val currentResultRank = getContestRank(contest, request.getCr_tv())
|
||||
if (request.getCr_if() == 0) {
|
||||
// Do contest is playing
|
||||
profile.isContestNowPlayingEnable = true
|
||||
profile.contestNowPlayingEnable = true
|
||||
profile.contestNowPlayingId = request.getCr_cid()
|
||||
profile.contestNowPlayingResultRank = currentResultRank
|
||||
profile.contestNowPlayingValue = request.getCr_tv()
|
||||
@ -60,7 +60,7 @@ class EndHandler(val db: DivaRepos) {
|
||||
contestRecord.lastUpdateTime = LocalDateTime.now()
|
||||
|
||||
db.contest.save(contestRecord)
|
||||
profile.isContestNowPlayingEnable = false
|
||||
profile.contestNowPlayingEnable = false
|
||||
profile.contestNowPlayingId = -1
|
||||
profile.contestNowPlayingResultRank = ContestBorder.NONE
|
||||
profile.contestNowPlayingValue = -1
|
||||
|
||||
@ -7,7 +7,7 @@ import icu.samnyan.aqua.sega.diva.model.common.PreStartResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.PreStartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.user.PreStartResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
import java.util.concurrent.ThreadLocalRandom
|
||||
|
||||
@ -3,12 +3,12 @@ package icu.samnyan.aqua.sega.diva.handler.user
|
||||
import icu.samnyan.aqua.sega.diva.DivaRepos
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.model.common.collection.ClearTally
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.model.request.user.StartRequest
|
||||
import icu.samnyan.aqua.sega.diva.model.response.user.StartResponse
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.GameSession
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerContest
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord
|
||||
import icu.samnyan.aqua.sega.diva.util.PvRecordDataException
|
||||
import org.springframework.stereotype.Component
|
||||
import java.time.LocalDateTime
|
||||
@ -32,9 +32,9 @@ class StartHandler(val db: DivaRepos) {
|
||||
|
||||
val contestResult = getContestResult(profile)
|
||||
|
||||
var border = if (profile.isShowGreatBorder) 1 else 0
|
||||
border = border or ((if (profile.isShowExcellentBorder) 1 else 0) shl 1)
|
||||
border = border or ((if (profile.isShowRivalBorder) 1 else 0) shl 2)
|
||||
var border = if (profile.showGreatBorder) 1 else 0
|
||||
border = border or ((if (profile.showExcellentBorder) 1 else 0) shl 1)
|
||||
border = border or ((if (profile.showRivalBorder) 1 else 0) shl 2)
|
||||
|
||||
return StartResponse(
|
||||
profile.pdId,
|
||||
@ -43,7 +43,7 @@ class StartHandler(val db: DivaRepos) {
|
||||
session.acceptId,
|
||||
profile.playerName,
|
||||
profile.headphoneVolume,
|
||||
profile.isButtonSeOn,
|
||||
profile.buttonSeOn,
|
||||
profile.buttonSeVolume,
|
||||
profile.sliderSeVolume,
|
||||
profile.sortMode,
|
||||
@ -58,13 +58,13 @@ class StartHandler(val db: DivaRepos) {
|
||||
LocalDateTime.now(),
|
||||
module_have,
|
||||
customize_have,
|
||||
profile.isPreferPerPvModule,
|
||||
profile.isPreferCommonModule,
|
||||
profile.isUsePerPvSkin,
|
||||
profile.isUsePerPvButtonSe,
|
||||
profile.isUsePerPvSliderSe,
|
||||
profile.isUsePerPvChainSliderSe,
|
||||
profile.isUsePerPvTouchSliderSe,
|
||||
profile.preferPerPvModule,
|
||||
profile.preferCommonModule,
|
||||
profile.usePerPvSkin,
|
||||
profile.usePerPvButtonSe,
|
||||
profile.usePerPvSliderSe,
|
||||
profile.usePerPvChainSliderSe,
|
||||
profile.usePerPvTouchSliderSe,
|
||||
profile.vocaloidPoints,
|
||||
profile.nextPvId,
|
||||
profile.nextDifficulty,
|
||||
@ -74,7 +74,7 @@ class StartHandler(val db: DivaRepos) {
|
||||
contestResult["cv_rr"],
|
||||
contestResult["cv_bv"],
|
||||
contestResult["cv_bf"],
|
||||
if (profile.isContestNowPlayingEnable) profile.contestNowPlayingId else -1,
|
||||
if (profile.contestNowPlayingEnable) profile.contestNowPlayingId else -1,
|
||||
profile.contestNowPlayingValue,
|
||||
profile.contestNowPlayingResultRank,
|
||||
profile.contestNowPlayingSpecifier,
|
||||
@ -84,10 +84,10 @@ class StartHandler(val db: DivaRepos) {
|
||||
null,
|
||||
null,
|
||||
border.toString(),
|
||||
profile.isShowInterimRanking,
|
||||
profile.isShowClearStatus,
|
||||
profile.showInterimRanking,
|
||||
profile.showClearStatus,
|
||||
countClearStatus(profile),
|
||||
profile.isShowRgoSetting,
|
||||
profile.showRgoSetting,
|
||||
null, // Currently quest not working
|
||||
null,
|
||||
null,
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.common.collection;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Festa;
|
||||
import icu.samnyan.aqua.sega.diva.model.db.gamedata.Festa;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import lombok.Data;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.common.collection;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerPvRecord;
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerPvRecord;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import ext.csv
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestLeague
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestNormaType
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.*
|
||||
import org.apache.commons.lang3.StringUtils
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaContest")
|
||||
@Table(name = "diva_contest")
|
||||
class Contest : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id = 0
|
||||
var enable = false
|
||||
var startTime: LocalDateTime = LocalDateTime.now()
|
||||
var endTime: LocalDateTime = LocalDateTime.now()
|
||||
var name: String = ""
|
||||
var description: String = ""
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var league: ContestLeague = ContestLeague.BEGINNER
|
||||
var stars = 0
|
||||
var minComplexity = 0 // Only use when Pv difficulty list is not set.
|
||||
var maxComplexity = 0
|
||||
var stages = 0
|
||||
var stageLimit: String = ""
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var normaType: ContestNormaType = ContestNormaType.SCORE
|
||||
var bronzeBorders = 0
|
||||
var sliverBorders = 0
|
||||
var goldBorders = 0
|
||||
|
||||
// Pv List format: "pv_id_start:pv_id_end,pv_id_start:pv_id_end,pv_id_start:pv_id_end" more than 20 group will be ignore, put in -1 for empty end
|
||||
var pvList: String = ""
|
||||
|
||||
// Pv difficulty list format: "pv_difficulty:min_complexity:max_complexity"
|
||||
var pvDiffList: String = ""
|
||||
|
||||
// ContestReward format:
|
||||
// Reward Type: (-1 None, 0 VP, 1 Skin, 2 Callsign, 3 Customize)
|
||||
// Format: "rewardType:reward:string1:string2" string1 and 2 should be urlencoded and must exist. use *** aka %2A%2A%2A as placeholder
|
||||
var bronzeContestReward: String = ""
|
||||
var sliverContestReward: String = ""
|
||||
var goldContestReward: String = ""
|
||||
|
||||
// ContestReward format: "rewardType:reward:string1:string2"
|
||||
var contestEntryReward: String = ""
|
||||
|
||||
constructor()
|
||||
|
||||
val string: String
|
||||
get() {
|
||||
val list = mutableListOf(
|
||||
this.id, // Contest ID
|
||||
DivaTime.format(this.startTime), // Start time
|
||||
DivaTime.format(this.endTime), // End time
|
||||
URIEncoder.encode(this.name), // Contest name
|
||||
URIEncoder.encode(this.description), // Contest description
|
||||
this.league.value, // Contest league
|
||||
this.stars, // Contest starts
|
||||
this.stages, // Contest stage, 1~9
|
||||
this.stageLimit, // list_lump_num ( 0 will be all stage same. > 1 will became stage max defined chart )
|
||||
this.normaType.value,
|
||||
this.bronzeBorders,
|
||||
this.sliverBorders,
|
||||
this.goldBorders
|
||||
)
|
||||
for (i in 1..20) {
|
||||
// format is "pv_range_start,pv_range_end,min_complexity,max_complexity,difficulty,unknown"
|
||||
if (pvList.isBlank() || !pvList.contains(":")) {
|
||||
list += listOf(-1, -1)
|
||||
if (i == 1) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
} else {
|
||||
list.add(-2)
|
||||
list.add(-2)
|
||||
}
|
||||
list += listOf(-1, -2, "7fffffffffffffffffffffffffffffff")
|
||||
} else {
|
||||
val groups = pvList.split(',').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
if (groups.size < i) {
|
||||
list += listOf(-1, -1, -2, -2, -1, -2, "7fffffffffffffffffffffffffffffff")
|
||||
} else {
|
||||
val ids = groups[i - 1].split(':').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
list.add(ids[0])
|
||||
list.add(ids[1])
|
||||
if (StringUtils.isBlank(pvDiffList) || !pvDiffList.contains(":")) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
list.add(-1)
|
||||
} else {
|
||||
val diffList = pvDiffList.split(',').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
if (diffList.size < i) {
|
||||
list.add(this.minComplexity)
|
||||
list.add(this.maxComplexity)
|
||||
list.add(-1)
|
||||
} else {
|
||||
val diff = diffList[i - 1].split(':').dropLastWhile { it.isEmpty() }.toTypedArray()
|
||||
list.add(diff[1])
|
||||
list.add(diff[2])
|
||||
list.add(diff[0])
|
||||
}
|
||||
}
|
||||
list.add(-2)
|
||||
list.add("7fffffffffffffffffffffffffffffff")
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.csv
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,33 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
|
||||
@Entity(name = "DivaPvLevel")
|
||||
@Table(name = "diva_pv_info_level")
|
||||
class Difficulty {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
var id: Long = 0
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pv_id")
|
||||
var pv: Pv = Pv()
|
||||
var edition = 0
|
||||
var level: String = ""
|
||||
var version = 0
|
||||
var diff: String = ""
|
||||
|
||||
constructor(id: Long, pv: Pv, edition: Int, level: String, version: Int, diff: String) {
|
||||
this.id = id
|
||||
this.pv = pv
|
||||
this.edition = edition
|
||||
this.level = level
|
||||
this.version = version
|
||||
this.diff = diff
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.Table
|
||||
import lombok.Data
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaCustomize")
|
||||
@Table(name = "diva_customize")
|
||||
class DivaCustomize : Serializable, Internalizable {
|
||||
@Id
|
||||
var id = 0
|
||||
var name: String = ""
|
||||
var price = 0
|
||||
var releaseDate: LocalDateTime = LocalDateTime.now()
|
||||
var endDate: LocalDateTime = LocalDateTime.now()
|
||||
var sortOrder = 0
|
||||
|
||||
override fun toInternal() = "$id,0,${URIEncoder.encode(name)},$price,${DivaTime.format(releaseDate)},${DivaTime.format(endDate)},$sortOrder"
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Id
|
||||
import jakarta.persistence.Table
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaModule")
|
||||
@Table(name = "diva_module")
|
||||
class DivaModule : Serializable, Internalizable {
|
||||
@Id
|
||||
var id = 0
|
||||
var name: String = ""
|
||||
var price = 0
|
||||
var releaseDate: LocalDateTime = LocalDateTime.now()
|
||||
var endDate: LocalDateTime = LocalDateTime.now()
|
||||
var sortOrder = 0
|
||||
|
||||
override fun toInternal() = "$id,0,${URIEncoder.encode(name)},$price,${DivaTime.format(releaseDate)},${DivaTime.format(endDate)},$sortOrder"
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.FestaKind
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaFesta")
|
||||
@Table(name = "diva_festa")
|
||||
class Festa : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id = -1
|
||||
var enable = true
|
||||
var name: String = "xxx"
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var kind: FestaKind = FestaKind.PINK_FESTA
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.UNDEFINED
|
||||
var pvList: String = "ALL"
|
||||
var attributes: String = "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
|
||||
var addVP: Int = 0
|
||||
var vpMultiplier: Int = 1
|
||||
var start: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
var end: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
var createDate: LocalDateTime = LocalDateTime.of(2005, 1, 1, 0, 0)
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPvInfo")
|
||||
@Table(name = "diva_pv_info")
|
||||
class Pv : Serializable {
|
||||
@Id
|
||||
var pvId: Int = 0
|
||||
var bpm: Int = 0
|
||||
var songName: String = ""
|
||||
var songNameEng: String = ""
|
||||
var songNameReading: String = ""
|
||||
var arranger: String = ""
|
||||
var lyrics: String = ""
|
||||
var music: String = ""
|
||||
var performerNumber: Int = 0
|
||||
|
||||
@OneToMany(cascade = [CascadeType.ALL], fetch = FetchType.LAZY, mappedBy = "pv")
|
||||
@MapKey(name = "diff")
|
||||
var difficulty: MutableMap<String, Difficulty> = mutableMapOf()
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.gamedata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPvEntry")
|
||||
@Table(name = "diva_pv_entry")
|
||||
class PvEntry : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
var pvId = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
var version = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
var demoStart: LocalDateTime = LocalDateTime.now()
|
||||
var demoEnd: LocalDateTime = LocalDateTime.now()
|
||||
var playableStart: LocalDateTime = LocalDateTime.now()
|
||||
var playableEnd: LocalDateTime = LocalDateTime.now()
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaGameSession")
|
||||
@Table(name = "diva_game_session")
|
||||
class GameSession : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
var acceptId = 0
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "pd_id", unique = true)
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var startMode: StartMode = StartMode.START
|
||||
var startTime: LocalDateTime = LocalDateTime.now()
|
||||
var lastUpdateTime: LocalDateTime = LocalDateTime.now()
|
||||
var stageIndex: Int = 0
|
||||
var stageResultIndex: Int = 0
|
||||
var lastPvId: Int = 0
|
||||
var levelNumber: Int = 0
|
||||
var levelExp: Int = 0
|
||||
var oldLevelNumber: Int = 0
|
||||
var oldLevelExp: Int = 0
|
||||
var vp: Int = 0
|
||||
|
||||
constructor(
|
||||
acceptId: Int,
|
||||
pdId: PlayerProfile,
|
||||
startMode: StartMode,
|
||||
startTime: LocalDateTime,
|
||||
lastUpdateTime: LocalDateTime,
|
||||
stageIndex: Int,
|
||||
stageResultIndex: Int,
|
||||
lastPvId: Int,
|
||||
levelNumber: Int,
|
||||
levelExp: Int,
|
||||
oldLevelNumber: Int,
|
||||
oldLevelExp: Int,
|
||||
vp: Int
|
||||
) {
|
||||
this.acceptId = acceptId
|
||||
this.pdId = pdId
|
||||
this.startMode = startMode
|
||||
this.startTime = startTime
|
||||
this.lastUpdateTime = lastUpdateTime
|
||||
this.stageIndex = stageIndex
|
||||
this.stageResultIndex = stageResultIndex
|
||||
this.lastPvId = lastPvId
|
||||
this.levelNumber = levelNumber
|
||||
this.levelExp = levelExp
|
||||
this.oldLevelNumber = oldLevelNumber
|
||||
this.oldLevelExp = oldLevelExp
|
||||
this.vp = vp
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,152 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayLog")
|
||||
@Table(name = "diva_play_log")
|
||||
class PlayLog : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var pvId = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
var scriptVer = 0
|
||||
var score = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var challengeKind: ChallengeKind = ChallengeKind.UNDEFINED
|
||||
var challengeResult = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var clearResult: ClearResult = ClearResult.NO_CLEAR
|
||||
var vp = 0
|
||||
var coolCount = 0
|
||||
var coolPercent = 0
|
||||
var fineCount = 0
|
||||
var finePercent = 0
|
||||
var safeCount = 0
|
||||
var safePercent = 0
|
||||
var sadCount = 0
|
||||
var sadPercent = 0
|
||||
var wrongCount = 0
|
||||
var wrongPercent = 0
|
||||
var maxCombo = 0
|
||||
var chanceTime = 0
|
||||
var holdScore = 0
|
||||
var attainPoint = 0
|
||||
var skinId = 0
|
||||
var buttonSe = 0
|
||||
var buttonSeVol = 0
|
||||
var sliderSe = 0
|
||||
var ChainSlideSe = 0
|
||||
var SliderTouchSe = 0
|
||||
var modules: String = ""
|
||||
var stageCompletion = 0
|
||||
var slideScore = 0
|
||||
var isVocalChange = 0
|
||||
var customizeItems: String = ""
|
||||
|
||||
// String customizeItemFlags;
|
||||
var rhythmGameOptions: String = ""
|
||||
var screenShotCount = -1
|
||||
var dateTime: LocalDateTime = LocalDateTime.now()
|
||||
|
||||
constructor(
|
||||
pdId: PlayerProfile,
|
||||
pvId: Int,
|
||||
difficulty: Difficulty,
|
||||
edition: Edition,
|
||||
scriptVer: Int,
|
||||
score: Int,
|
||||
challengeKind: ChallengeKind,
|
||||
challengeResult: Int,
|
||||
clearResult: ClearResult,
|
||||
vp: Int,
|
||||
coolCount: Int,
|
||||
coolPercent: Int,
|
||||
fineCount: Int,
|
||||
finePercent: Int,
|
||||
safeCount: Int,
|
||||
safePercent: Int,
|
||||
sadCount: Int,
|
||||
sadPercent: Int,
|
||||
wrongCount: Int,
|
||||
wrongPercent: Int,
|
||||
maxCombo: Int,
|
||||
chanceTime: Int,
|
||||
holdScore: Int,
|
||||
attainPoint: Int,
|
||||
skinId: Int,
|
||||
buttonSe: Int,
|
||||
buttonSeVol: Int,
|
||||
sliderSe: Int,
|
||||
chainSlideSe: Int,
|
||||
sliderTouchSe: Int,
|
||||
modules: String,
|
||||
stageCompletion: Int,
|
||||
slideScore: Int,
|
||||
isVocalChange: Int,
|
||||
customizeItems: String,
|
||||
rhythmGameOptions: String,
|
||||
screenShotCount: Int,
|
||||
dateTime: LocalDateTime
|
||||
) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
this.difficulty = difficulty
|
||||
this.edition = edition
|
||||
this.scriptVer = scriptVer
|
||||
this.score = score
|
||||
this.challengeKind = challengeKind
|
||||
this.challengeResult = challengeResult
|
||||
this.clearResult = clearResult
|
||||
this.vp = vp
|
||||
this.coolCount = coolCount
|
||||
this.coolPercent = coolPercent
|
||||
this.fineCount = fineCount
|
||||
this.finePercent = finePercent
|
||||
this.safeCount = safeCount
|
||||
this.safePercent = safePercent
|
||||
this.sadCount = sadCount
|
||||
this.sadPercent = sadPercent
|
||||
this.wrongCount = wrongCount
|
||||
this.wrongPercent = wrongPercent
|
||||
this.maxCombo = maxCombo
|
||||
this.chanceTime = chanceTime
|
||||
this.holdScore = holdScore
|
||||
this.attainPoint = attainPoint
|
||||
this.skinId = skinId
|
||||
this.buttonSe = buttonSe
|
||||
this.buttonSeVol = buttonSeVol
|
||||
this.sliderSe = sliderSe
|
||||
ChainSlideSe = chainSlideSe
|
||||
SliderTouchSe = sliderTouchSe
|
||||
this.modules = modules
|
||||
this.stageCompletion = stageCompletion
|
||||
this.slideScore = slideScore
|
||||
this.isVocalChange = isVocalChange
|
||||
this.customizeItems = customizeItems
|
||||
this.rhythmGameOptions = rhythmGameOptions
|
||||
this.screenShotCount = screenShotCount
|
||||
this.dateTime = dateTime
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestBorder
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayerContest")
|
||||
@Table(name = "diva_player_contest", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "contest_id"])])
|
||||
class PlayerContest : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "contest_id")
|
||||
var contestId = 0
|
||||
var startCount = 0
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var resultRank: ContestBorder = ContestBorder.NONE
|
||||
var bestValue = -1
|
||||
var flag = -1
|
||||
var lastUpdateTime: LocalDateTime = LocalDateTime.now()
|
||||
|
||||
constructor(pdId: PlayerProfile, contestId: Int) {
|
||||
this.pdId = pdId
|
||||
this.contestId = contestId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerCustomize")
|
||||
@Table(name = "diva_player_customize", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "customize_id"])])
|
||||
class PlayerCustomize : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "customize_id")
|
||||
var customizeId = 0
|
||||
|
||||
constructor(profile: PlayerProfile, customizeId: Int) {
|
||||
this.pdId = profile
|
||||
this.customizeId = customizeId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerInventory")
|
||||
@Table(name = "diva_player_inventory", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "value", "type"])])
|
||||
class PlayerInventory : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var value: String = ""
|
||||
|
||||
// Type: (1: Skin, 2: Call sign plate, 3: Call sign)
|
||||
var type: String = ""
|
||||
|
||||
constructor(pdId: PlayerProfile, value: String, type: String) {
|
||||
this.pdId = pdId
|
||||
this.value = value
|
||||
this.type = type
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerModule")
|
||||
@Table(name = "diva_player_module", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "module_id"])])
|
||||
class PlayerModule : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "module_id")
|
||||
var moduleId = 0
|
||||
|
||||
constructor(profile: PlayerProfile, moduleId: Int) {
|
||||
this.pdId = profile
|
||||
this.moduleId = moduleId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,225 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaStringUtils.getDummyString
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "DivaPlayerProfile")
|
||||
@Table(name = "diva_player_profile")
|
||||
class PlayerProfile : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@Column(unique = true)
|
||||
var pdId: Long = 0
|
||||
var playerName: String = "xxx"
|
||||
var vocaloidPoints = 300
|
||||
var level = 1
|
||||
var levelExp = 0
|
||||
var levelTitle: String = "xxx"
|
||||
var plateId = -1
|
||||
var plateEffectId = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var passwordStatus: PassStat = PassStat.MISS
|
||||
|
||||
@JsonIgnore
|
||||
var password: String = "**********"
|
||||
|
||||
/**
|
||||
* Game play customize
|
||||
*/
|
||||
var preferPerPvModule = true
|
||||
var preferCommonModule = false
|
||||
var usePerPvSkin = false
|
||||
var usePerPvButtonSe = false
|
||||
var usePerPvSliderSe = false
|
||||
var usePerPvChainSliderSe = false
|
||||
var usePerPvTouchSliderSe = false
|
||||
var commonModule: String = "-999,-999,-999"
|
||||
var commonCustomizeItems: String = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999"
|
||||
var commonModuleSetTime: LocalDateTime = LocalDateTime.now()
|
||||
var moduleSelectItemFlag: String = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
|
||||
// -1 is disable
|
||||
var commonSkin = -1
|
||||
|
||||
/**
|
||||
* Sound Setting
|
||||
*/
|
||||
var headphoneVolume = 100
|
||||
var buttonSeOn = true
|
||||
var buttonSeVolume = 100
|
||||
var sliderSeVolume = 100
|
||||
var buttonSe = -1
|
||||
var chainSlideSe = -1
|
||||
var slideSe = -1
|
||||
var sliderTouchSe = -1
|
||||
|
||||
/**
|
||||
* View Setting
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
var sortMode: SortMode = SortMode.RELEASE_DATE
|
||||
|
||||
@JsonIgnore
|
||||
var nextPvId = -1
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var nextDifficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var nextEdition: Edition = Edition.ORIGINAL
|
||||
var showInterimRanking = true
|
||||
var showClearStatus = true
|
||||
var showGreatBorder = true
|
||||
var showExcellentBorder = true
|
||||
var showRivalBorder = true
|
||||
var showRgoSetting = true
|
||||
|
||||
@JsonIgnore
|
||||
var contestNowPlayingEnable = false
|
||||
|
||||
@JsonIgnore
|
||||
var contestNowPlayingId = -1
|
||||
|
||||
// Contest now playing progress
|
||||
@JsonIgnore
|
||||
var contestNowPlayingValue = -1
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
var contestNowPlayingResultRank: ContestBorder = ContestBorder.NONE
|
||||
|
||||
// This store the current progress of contest
|
||||
@JsonIgnore
|
||||
var contestNowPlayingSpecifier: String = ""
|
||||
|
||||
|
||||
/**
|
||||
* MyList, comma separate string
|
||||
*/
|
||||
var myList0: String = getDummyString("-1", 40)
|
||||
var myList1: String = getDummyString("-1", 40)
|
||||
var myList2: String = getDummyString("-1", 40)
|
||||
|
||||
@JsonIgnore
|
||||
var rivalPdId: Long = -1
|
||||
|
||||
constructor(pdId: Long, playerName: String) {
|
||||
this.pdId = pdId
|
||||
this.playerName = playerName
|
||||
}
|
||||
|
||||
constructor(
|
||||
id: Long,
|
||||
pdId: Long,
|
||||
playerName: String,
|
||||
vocaloidPoints: Int,
|
||||
level: Int,
|
||||
levelExp: Int,
|
||||
levelTitle: String,
|
||||
plateId: Int,
|
||||
plateEffectId: Int,
|
||||
passwordStatus: PassStat,
|
||||
password: String,
|
||||
preferPerPvModule: Boolean,
|
||||
preferCommonModule: Boolean,
|
||||
usePerPvSkin: Boolean,
|
||||
usePerPvButtonSe: Boolean,
|
||||
usePerPvSliderSe: Boolean,
|
||||
usePerPvChainSliderSe: Boolean,
|
||||
usePerPvTouchSliderSe: Boolean,
|
||||
commonModule: String,
|
||||
commonCustomizeItems: String,
|
||||
commonModuleSetTime: LocalDateTime,
|
||||
moduleSelectItemFlag: String,
|
||||
commonSkin: Int,
|
||||
headphoneVolume: Int,
|
||||
buttonSeOn: Boolean,
|
||||
buttonSeVolume: Int,
|
||||
sliderSeVolume: Int,
|
||||
buttonSe: Int,
|
||||
chainSlideSe: Int,
|
||||
slideSe: Int,
|
||||
sliderTouchSe: Int,
|
||||
sortMode: SortMode,
|
||||
nextPvId: Int,
|
||||
nextDifficulty: Difficulty,
|
||||
nextEdition: Edition,
|
||||
showInterimRanking: Boolean,
|
||||
showClearStatus: Boolean,
|
||||
showGreatBorder: Boolean,
|
||||
showExcellentBorder: Boolean,
|
||||
showRivalBorder: Boolean,
|
||||
showRgoSetting: Boolean,
|
||||
contestNowPlayingEnable: Boolean,
|
||||
contestNowPlayingId: Int,
|
||||
contestNowPlayingValue: Int,
|
||||
contestNowPlayingResultRank: ContestBorder,
|
||||
contestNowPlayingSpecifier: String,
|
||||
myList0: String,
|
||||
myList1: String,
|
||||
myList2: String,
|
||||
rivalPdId: Long
|
||||
) {
|
||||
this.id = id
|
||||
this.pdId = pdId
|
||||
this.playerName = playerName
|
||||
this.vocaloidPoints = vocaloidPoints
|
||||
this.level = level
|
||||
this.levelExp = levelExp
|
||||
this.levelTitle = levelTitle
|
||||
this.plateId = plateId
|
||||
this.plateEffectId = plateEffectId
|
||||
this.passwordStatus = passwordStatus
|
||||
this.password = password
|
||||
this.preferPerPvModule = preferPerPvModule
|
||||
this.preferCommonModule = preferCommonModule
|
||||
this.usePerPvSkin = usePerPvSkin
|
||||
this.usePerPvButtonSe = usePerPvButtonSe
|
||||
this.usePerPvSliderSe = usePerPvSliderSe
|
||||
this.usePerPvChainSliderSe = usePerPvChainSliderSe
|
||||
this.usePerPvTouchSliderSe = usePerPvTouchSliderSe
|
||||
this.commonModule = commonModule
|
||||
this.commonCustomizeItems = commonCustomizeItems
|
||||
this.commonModuleSetTime = commonModuleSetTime
|
||||
this.moduleSelectItemFlag = moduleSelectItemFlag
|
||||
this.commonSkin = commonSkin
|
||||
this.headphoneVolume = headphoneVolume
|
||||
this.buttonSeOn = buttonSeOn
|
||||
this.buttonSeVolume = buttonSeVolume
|
||||
this.sliderSeVolume = sliderSeVolume
|
||||
this.buttonSe = buttonSe
|
||||
this.chainSlideSe = chainSlideSe
|
||||
this.slideSe = slideSe
|
||||
this.sliderTouchSe = sliderTouchSe
|
||||
this.sortMode = sortMode
|
||||
this.nextPvId = nextPvId
|
||||
this.nextDifficulty = nextDifficulty
|
||||
this.nextEdition = nextEdition
|
||||
this.showInterimRanking = showInterimRanking
|
||||
this.showClearStatus = showClearStatus
|
||||
this.showGreatBorder = showGreatBorder
|
||||
this.showExcellentBorder = showExcellentBorder
|
||||
this.showRivalBorder = showRivalBorder
|
||||
this.showRgoSetting = showRgoSetting
|
||||
this.contestNowPlayingEnable = contestNowPlayingEnable
|
||||
this.contestNowPlayingId = contestNowPlayingId
|
||||
this.contestNowPlayingValue = contestNowPlayingValue
|
||||
this.contestNowPlayingResultRank = contestNowPlayingResultRank
|
||||
this.contestNowPlayingSpecifier = contestNowPlayingSpecifier
|
||||
this.myList0 = myList0
|
||||
this.myList1 = myList1
|
||||
this.myList2 = myList2
|
||||
this.rivalPdId = rivalPdId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerPvCustomize")
|
||||
@Table(name = "diva_player_pv_customize", uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "pv_id"])])
|
||||
class PlayerPvCustomize : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "pv_id")
|
||||
var pvId = -1
|
||||
var module: String = "-999,-999,-999"
|
||||
var customize: String = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999"
|
||||
var customizeFlag: String = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"
|
||||
var skin = -1
|
||||
var buttonSe = -1
|
||||
var slideSe = -1
|
||||
var chainSlideSe = -1
|
||||
var sliderTouchSe = -1
|
||||
|
||||
constructor(pdId: PlayerProfile, pvId: Int) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import jakarta.persistence.*
|
||||
import java.io.Serializable
|
||||
|
||||
@Entity(name = "DivaPlayerPvRecord")
|
||||
@Table(
|
||||
name = "diva_player_pv_record",
|
||||
uniqueConstraints = [UniqueConstraint(columnNames = ["pd_id", "pv_id", "edition", "difficulty"])]
|
||||
)
|
||||
class PlayerPvRecord : Serializable {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
|
||||
@Column(name = "pv_id")
|
||||
var pvId = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var edition: Edition = Edition.ORIGINAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var difficulty: Difficulty = Difficulty.NORMAL
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var result: ClearResult = ClearResult.NO_CLEAR
|
||||
var maxScore = -1
|
||||
var maxAttain = -1
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
var challengeKind: ChallengeKind = ChallengeKind.UNDEFINED
|
||||
var rgoPurchased: String = "0,0,0"
|
||||
var rgoPlayed: String = "0,0,0"
|
||||
|
||||
constructor(pvId: Int, edition: Edition) {
|
||||
this.pvId = pvId
|
||||
this.edition = edition
|
||||
}
|
||||
|
||||
constructor(pdId: PlayerProfile, pvId: Int, edition: Edition, difficulty: Difficulty) {
|
||||
this.pdId = pdId
|
||||
this.pvId = pvId
|
||||
this.edition = edition
|
||||
this.difficulty = difficulty
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.db.userdata
|
||||
|
||||
import jakarta.persistence.*
|
||||
|
||||
@Entity(name = "DivaPlayerScreenShot")
|
||||
@Table(name = "diva_player_screen_shot")
|
||||
class PlayerScreenShot {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
var id: Long = 0
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
var pdId: PlayerProfile = PlayerProfile()
|
||||
var pvId: Long = 0
|
||||
var fileName: String = ""
|
||||
var moduleList: String = ""
|
||||
var customizeList: String = ""
|
||||
|
||||
constructor(pdId: PlayerProfile, fileName: String, pvId: Long, moduleList: String, customizeList: String) {
|
||||
this.pdId = pdId
|
||||
this.fileName = fileName
|
||||
this.pvId = pvId
|
||||
this.moduleList = moduleList
|
||||
this.customizeList = customizeList
|
||||
}
|
||||
|
||||
constructor()
|
||||
}
|
||||
@ -1,153 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestLeague;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestNormaType;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaContest")
|
||||
@Table(name = "diva_contest")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Contest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id;
|
||||
|
||||
private boolean enable;
|
||||
|
||||
private LocalDateTime startTime;
|
||||
|
||||
private LocalDateTime endTime;
|
||||
|
||||
private String name;
|
||||
|
||||
private String description;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestLeague league;
|
||||
|
||||
private int stars;
|
||||
|
||||
private int minComplexity; // Only use when Pv difficulty list is not set.
|
||||
|
||||
private int maxComplexity;
|
||||
|
||||
private int stages;
|
||||
|
||||
private String stageLimit;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestNormaType normaType;
|
||||
|
||||
private int bronzeBorders = 0;
|
||||
|
||||
private int sliverBorders = 0;
|
||||
|
||||
private int goldBorders = 0;
|
||||
|
||||
// Pv List format: "pv_id_start:pv_id_end,pv_id_start:pv_id_end,pv_id_start:pv_id_end" more than 20 group will be ignore, put in -1 for empty end
|
||||
private String pvList;
|
||||
|
||||
// Pv difficulty list format: "pv_difficulty:min_complexity:max_complexity"
|
||||
private String pvDiffList;
|
||||
|
||||
// ContestReward format:
|
||||
// Reward Type: (-1 None, 0 VP, 1 Skin, 2 Callsign, 3 Customize)
|
||||
// Format: "rewardType:reward:string1:string2" string1 and 2 should be urlencoded and must exist. use *** aka %2A%2A%2A as placeholder
|
||||
private String bronzeContestReward;
|
||||
|
||||
private String sliverContestReward;
|
||||
|
||||
private String goldContestReward;
|
||||
|
||||
// ContestReward format: "rewardType:reward:string1:string2"
|
||||
private String contestEntryReward;
|
||||
|
||||
public String getString() {
|
||||
List<Object> list = new LinkedList<>();
|
||||
list.add(this.id); // Contest ID
|
||||
list.add(DivaTime.format(this.startTime)); // Start time
|
||||
list.add(DivaTime.format(this.endTime)); // End time
|
||||
list.add(URIEncoder.encode(this.name)); // Contest name
|
||||
list.add(URIEncoder.encode(this.description)); // Contest description
|
||||
list.add(this.league.getValue()); // Contest league
|
||||
list.add(this.stars); // Contest starts
|
||||
list.add(this.stages); // Contest stage, 1~9
|
||||
list.add(this.stageLimit); // list_lump_num ( 0 will be all stage same. > 1 will became stage max defined chart? )
|
||||
list.add(this.normaType.getValue());
|
||||
list.add(this.bronzeBorders);
|
||||
list.add(this.sliverBorders);
|
||||
list.add(this.goldBorders);
|
||||
for (int i = 1; i <= 20; i++) {
|
||||
// format is "pv_range_start,pv_range_end,min_complexity,max_complexity,difficulty,unknown"
|
||||
if (StringUtils.isBlank(pvList) || !pvList.contains(":")) {
|
||||
list.add(-1);
|
||||
list.add(-1);
|
||||
if (i == 1) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
} else {
|
||||
list.add(-2);
|
||||
list.add(-2);
|
||||
}
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
} else {
|
||||
String[] groups = pvList.split(",");
|
||||
if (groups.length < i) {
|
||||
list.add(-1);
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add(-2);
|
||||
list.add(-1);
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
} else {
|
||||
String[] ids = groups[i - 1].split(":");
|
||||
list.add(ids[0]);
|
||||
list.add(ids[1]);
|
||||
if (StringUtils.isBlank(pvDiffList) || !pvDiffList.contains(":")) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
list.add(-1);
|
||||
} else {
|
||||
String[] diffList = pvDiffList.split(",");
|
||||
if (diffList.length < i) {
|
||||
list.add(this.minComplexity);
|
||||
list.add(this.maxComplexity);
|
||||
list.add(-1);
|
||||
} else {
|
||||
String[] diff = diffList[i - 1].split(":");
|
||||
list.add(diff[1]);
|
||||
list.add(diff[2]);
|
||||
list.add(diff[0]);
|
||||
}
|
||||
}
|
||||
list.add(-2);
|
||||
list.add("7fffffffffffffffffffffffffffffff");
|
||||
}
|
||||
}
|
||||
}
|
||||
return list.stream().map(Object::toString).collect(Collectors.joining(","));
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvLevel")
|
||||
@Table(name = "diva_pv_info_level")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Difficulty {
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pv_id")
|
||||
private Pv pv;
|
||||
|
||||
private int edition;
|
||||
|
||||
private String level;
|
||||
|
||||
private int version;
|
||||
|
||||
private String diff;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaCustomize")
|
||||
@Table(name = "diva_customize")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DivaCustomize implements Serializable, Internalizable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
|
||||
private int price;
|
||||
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private int sortOrder;
|
||||
|
||||
@Override
|
||||
public String toInternal() {
|
||||
return id + ",0," +
|
||||
URIEncoder.encode(name) + "," +
|
||||
price + "," +
|
||||
DivaTime.format(releaseDate) + "," +
|
||||
DivaTime.format(endDate) + "," +
|
||||
sortOrder;
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.Internalizable;
|
||||
import icu.samnyan.aqua.sega.diva.util.DivaTime;
|
||||
import icu.samnyan.aqua.sega.diva.util.URIEncoder;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaModule")
|
||||
@Table(name = "diva_module")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DivaModule implements Serializable, Internalizable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private int id;
|
||||
|
||||
private String name;
|
||||
|
||||
private int price;
|
||||
|
||||
private LocalDateTime releaseDate;
|
||||
|
||||
private LocalDateTime endDate;
|
||||
|
||||
private int sortOrder;
|
||||
|
||||
@Override
|
||||
public String toInternal() {
|
||||
return id + ",0," +
|
||||
URIEncoder.encode(name) + "," +
|
||||
price + "," +
|
||||
DivaTime.format(releaseDate) + "," +
|
||||
DivaTime.format(endDate) + "," +
|
||||
sortOrder;
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.FestaKind;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaFesta")
|
||||
@Table(name = "diva_festa")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Festa implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private int id = -1;
|
||||
|
||||
private boolean enable = true;
|
||||
|
||||
private String name = "xxx";
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private FestaKind kind = FestaKind.PINK_FESTA;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty = Difficulty.UNDEFINED;
|
||||
|
||||
private String pvList = "ALL";
|
||||
|
||||
private String attributes = "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
|
||||
|
||||
private Integer addVP = 0;
|
||||
|
||||
private Integer vpMultiplier = 1;
|
||||
|
||||
private LocalDateTime start = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
|
||||
private LocalDateTime end = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
|
||||
private LocalDateTime createDate = LocalDateTime.of(2005, 1, 1, 0, 0);
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvInfo")
|
||||
@Table(name = "diva_pv_info")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class Pv implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
private Integer pvId;
|
||||
|
||||
private Integer bpm;
|
||||
|
||||
private String songName;
|
||||
|
||||
private String songNameEng;
|
||||
|
||||
private String songNameReading;
|
||||
|
||||
private String arranger;
|
||||
|
||||
private String lyrics;
|
||||
|
||||
private String music;
|
||||
|
||||
private Integer performerNumber;
|
||||
|
||||
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "pv")
|
||||
@MapKey(name = "diff")
|
||||
private Map<String, Difficulty> difficulty;
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPvEntry")
|
||||
@Table(name = "diva_pv_entry")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PvEntry implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
private int pvId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty;
|
||||
|
||||
private int version;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition;
|
||||
|
||||
private LocalDateTime demoStart;
|
||||
|
||||
private LocalDateTime demoEnd;
|
||||
|
||||
private LocalDateTime playableStart;
|
||||
|
||||
private LocalDateTime playableEnd;
|
||||
|
||||
public PvEntry(int pvId, Difficulty difficulty, int version, Edition edition, LocalDateTime demoStart, LocalDateTime demoEnd, LocalDateTime playableStart, LocalDateTime playableEnd) {
|
||||
this.pvId = pvId;
|
||||
this.difficulty = difficulty;
|
||||
this.version = version;
|
||||
this.edition = edition;
|
||||
this.demoStart = demoStart;
|
||||
this.demoEnd = demoEnd;
|
||||
this.playableStart = playableStart;
|
||||
this.playableEnd = playableEnd;
|
||||
}
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.StartMode;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaGameSession")
|
||||
@Table(name = "diva_game_session")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GameSession implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
private int acceptId;
|
||||
|
||||
@OneToOne
|
||||
@JoinColumn(name = "pd_id", unique = true)
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private StartMode startMode;
|
||||
|
||||
private LocalDateTime startTime;
|
||||
|
||||
private LocalDateTime lastUpdateTime;
|
||||
|
||||
private Integer stageIndex;
|
||||
|
||||
private Integer stageResultIndex;
|
||||
|
||||
private Integer lastPvId;
|
||||
|
||||
private Integer levelNumber;
|
||||
|
||||
private Integer levelExp;
|
||||
|
||||
private Integer oldLevelNumber;
|
||||
|
||||
private Integer oldLevelExp;
|
||||
|
||||
private Integer vp;
|
||||
|
||||
public GameSession(int acceptId, PlayerProfile pdId, StartMode startMode, LocalDateTime startTime, LocalDateTime lastUpdateTime, Integer stageIndex, Integer stageResultIndex, Integer lastPvId, Integer levelNumber, Integer levelExp, Integer oldLevelNumber, Integer oldLevelExp, Integer vp) {
|
||||
this.acceptId = acceptId;
|
||||
this.pdId = pdId;
|
||||
this.startMode = startMode;
|
||||
this.startTime = startTime;
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
this.stageIndex = stageIndex;
|
||||
this.stageResultIndex = stageResultIndex;
|
||||
this.lastPvId = lastPvId;
|
||||
this.levelNumber = levelNumber;
|
||||
this.levelExp = levelExp;
|
||||
this.oldLevelNumber = oldLevelNumber;
|
||||
this.oldLevelExp = oldLevelExp;
|
||||
this.vp = vp;
|
||||
}
|
||||
}
|
||||
@ -1,157 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayLog")
|
||||
@Table(name = "diva_play_log")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlayLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private int pvId;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition;
|
||||
|
||||
private int scriptVer;
|
||||
|
||||
private int score;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ChallengeKind challengeKind;
|
||||
|
||||
private int challengeResult;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ClearResult clearResult;
|
||||
|
||||
private int vp;
|
||||
|
||||
private int coolCount;
|
||||
|
||||
private int coolPercent;
|
||||
|
||||
private int fineCount;
|
||||
|
||||
private int finePercent;
|
||||
|
||||
private int safeCount;
|
||||
|
||||
private int safePercent;
|
||||
|
||||
private int sadCount;
|
||||
|
||||
private int sadPercent;
|
||||
|
||||
private int wrongCount;
|
||||
|
||||
private int wrongPercent;
|
||||
|
||||
private int maxCombo;
|
||||
|
||||
private int chanceTime;
|
||||
|
||||
private int holdScore;
|
||||
|
||||
private int attainPoint;
|
||||
|
||||
private int skinId;
|
||||
|
||||
private int buttonSe;
|
||||
|
||||
private int buttonSeVol;
|
||||
|
||||
private int sliderSe;
|
||||
|
||||
private int ChainSlideSe;
|
||||
|
||||
private int SliderTouchSe;
|
||||
|
||||
private String modules;
|
||||
|
||||
private int stageCompletion;
|
||||
|
||||
private int slideScore;
|
||||
|
||||
private int isVocalChange;
|
||||
|
||||
private String customizeItems;
|
||||
|
||||
// private String customizeItemFlags;
|
||||
|
||||
private String rhythmGameOptions;
|
||||
|
||||
private int screenShotCount = -1;
|
||||
|
||||
private LocalDateTime dateTime;
|
||||
|
||||
public PlayLog(PlayerProfile pdId, int pvId, Difficulty difficulty, Edition edition, int scriptVer, int score, ChallengeKind challengeKind, int challengeResult, ClearResult clearResult, int vp, int coolCount, int coolPercent, int fineCount, int finePercent, int safeCount, int safePercent, int sadCount, int sadPercent, int wrongCount, int wrongPercent, int maxCombo, int chanceTime, int holdScore, int attainPoint, int skinId, int buttonSe, int buttonSeVol, int sliderSe, int chainSlideSe, int sliderTouchSe, String modules, int stageCompletion, int slideScore, int isVocalChange, String customizeItems, String rhythmGameOptions, int screenShotCount, LocalDateTime dateTime) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
this.difficulty = difficulty;
|
||||
this.edition = edition;
|
||||
this.scriptVer = scriptVer;
|
||||
this.score = score;
|
||||
this.challengeKind = challengeKind;
|
||||
this.challengeResult = challengeResult;
|
||||
this.clearResult = clearResult;
|
||||
this.vp = vp;
|
||||
this.coolCount = coolCount;
|
||||
this.coolPercent = coolPercent;
|
||||
this.fineCount = fineCount;
|
||||
this.finePercent = finePercent;
|
||||
this.safeCount = safeCount;
|
||||
this.safePercent = safePercent;
|
||||
this.sadCount = sadCount;
|
||||
this.sadPercent = sadPercent;
|
||||
this.wrongCount = wrongCount;
|
||||
this.wrongPercent = wrongPercent;
|
||||
this.maxCombo = maxCombo;
|
||||
this.chanceTime = chanceTime;
|
||||
this.holdScore = holdScore;
|
||||
this.attainPoint = attainPoint;
|
||||
this.skinId = skinId;
|
||||
this.buttonSe = buttonSe;
|
||||
this.buttonSeVol = buttonSeVol;
|
||||
this.sliderSe = sliderSe;
|
||||
ChainSlideSe = chainSlideSe;
|
||||
SliderTouchSe = sliderTouchSe;
|
||||
this.modules = modules;
|
||||
this.stageCompletion = stageCompletion;
|
||||
this.slideScore = slideScore;
|
||||
this.isVocalChange = isVocalChange;
|
||||
this.customizeItems = customizeItems;
|
||||
this.rhythmGameOptions = rhythmGameOptions;
|
||||
this.screenShotCount = screenShotCount;
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ContestBorder;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerContest")
|
||||
@Table(name = "diva_player_contest", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "contest_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerContest implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "contest_id")
|
||||
private int contestId;
|
||||
|
||||
private int startCount = 0;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestBorder resultRank = ContestBorder.NONE;
|
||||
|
||||
private int bestValue = -1;
|
||||
|
||||
private int flag = -1;
|
||||
|
||||
private LocalDateTime lastUpdateTime = LocalDateTime.now();
|
||||
|
||||
public PlayerContest(PlayerProfile pdId, int contestId) {
|
||||
this.pdId = pdId;
|
||||
this.contestId = contestId;
|
||||
}
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerCustomize")
|
||||
@Table(name = "diva_player_customize", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "customize_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerCustomize implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "customize_id")
|
||||
private int customizeId;
|
||||
|
||||
public PlayerCustomize(PlayerProfile profile, int customizeId) {
|
||||
this.pdId = profile;
|
||||
this.customizeId = customizeId;
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerInventory")
|
||||
@Table(name = "diva_player_inventory", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "value", "type"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerInventory implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private Long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private String value;
|
||||
|
||||
// Type: (1: Skin, 2: Call sign plate, 3: Call sign)
|
||||
private String type;
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerModule")
|
||||
@Table(name = "diva_player_module", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "module_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerModule implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "module_id")
|
||||
private int moduleId;
|
||||
|
||||
public PlayerModule(PlayerProfile profile, int moduleId) {
|
||||
this.pdId = profile;
|
||||
this.moduleId = moduleId;
|
||||
}
|
||||
}
|
||||
@ -1,167 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.*;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static icu.samnyan.aqua.sega.diva.util.DivaStringUtils.getDummyString;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerProfile")
|
||||
@Table(name = "diva_player_profile")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerProfile implements Serializable {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@Column(unique = true)
|
||||
private long pdId;
|
||||
|
||||
private String playerName = "xxx";
|
||||
|
||||
private int vocaloidPoints = 300;
|
||||
|
||||
private int level = 1;
|
||||
|
||||
private int levelExp = 0;
|
||||
|
||||
private String levelTitle = "xxx";
|
||||
|
||||
private int plateId = -1;
|
||||
|
||||
private int plateEffectId = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private PassStat passwordStatus = PassStat.MISS;
|
||||
|
||||
@JsonIgnore
|
||||
private String password = "**********";
|
||||
|
||||
/**
|
||||
* Game play customize
|
||||
*/
|
||||
private boolean preferPerPvModule = true;
|
||||
|
||||
private boolean preferCommonModule = false;
|
||||
|
||||
private boolean usePerPvSkin = false;
|
||||
|
||||
private boolean usePerPvButtonSe = false;
|
||||
|
||||
private boolean usePerPvSliderSe = false;
|
||||
|
||||
private boolean usePerPvChainSliderSe = false;
|
||||
|
||||
private boolean usePerPvTouchSliderSe = false;
|
||||
|
||||
private String commonModule = "-999,-999,-999";
|
||||
|
||||
private String commonCustomizeItems = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999";
|
||||
|
||||
private LocalDateTime commonModuleSetTime = LocalDateTime.now();
|
||||
|
||||
private String moduleSelectItemFlag = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
|
||||
// -1 is disable
|
||||
private int commonSkin = -1;
|
||||
|
||||
/**
|
||||
* Sound Setting
|
||||
*/
|
||||
private int headphoneVolume = 100;
|
||||
|
||||
private boolean buttonSeOn = true;
|
||||
|
||||
private int buttonSeVolume = 100;
|
||||
|
||||
private int sliderSeVolume = 100;
|
||||
|
||||
private int buttonSe = -1;
|
||||
|
||||
private int chainSlideSe = -1;
|
||||
|
||||
private int slideSe = -1;
|
||||
|
||||
private int sliderTouchSe = -1;
|
||||
|
||||
/**
|
||||
* View Setting
|
||||
*/
|
||||
@Enumerated(EnumType.STRING)
|
||||
private SortMode sortMode = SortMode.RELEASE_DATE;
|
||||
|
||||
@JsonIgnore
|
||||
private int nextPvId = -1;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty nextDifficulty = Difficulty.NORMAL;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition nextEdition = Edition.ORIGINAL;
|
||||
|
||||
private boolean showInterimRanking = true;
|
||||
|
||||
private boolean showClearStatus = true;
|
||||
|
||||
private boolean showGreatBorder = true;
|
||||
|
||||
private boolean showExcellentBorder = true;
|
||||
|
||||
private boolean showRivalBorder = true;
|
||||
|
||||
private boolean showRgoSetting = true;
|
||||
|
||||
@JsonIgnore
|
||||
private boolean contestNowPlayingEnable = false;
|
||||
|
||||
@JsonIgnore
|
||||
private int contestNowPlayingId = -1;
|
||||
|
||||
// Contest now playing progress
|
||||
@JsonIgnore
|
||||
private int contestNowPlayingValue = -1;
|
||||
|
||||
@JsonIgnore
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ContestBorder contestNowPlayingResultRank = ContestBorder.NONE;
|
||||
|
||||
// This store the current progress of contest
|
||||
@JsonIgnore
|
||||
private String contestNowPlayingSpecifier = "";
|
||||
|
||||
|
||||
/**
|
||||
* MyList, comma separate string
|
||||
*/
|
||||
private String myList0 = getDummyString("-1", 40);
|
||||
|
||||
private String myList1 = getDummyString("-1", 40);
|
||||
|
||||
private String myList2 = getDummyString("-1", 40);
|
||||
|
||||
@JsonIgnore
|
||||
private long rivalPdId = -1;
|
||||
|
||||
public PlayerProfile(long pdId, String playerName) {
|
||||
this.pdId = pdId;
|
||||
this.playerName = playerName;
|
||||
}
|
||||
}
|
||||
@ -1,55 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerPvCustomize")
|
||||
@Table(name = "diva_player_pv_customize", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "pv_id"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerPvCustomize implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "pv_id")
|
||||
private int pvId = -1;
|
||||
|
||||
private String module = "-999,-999,-999";
|
||||
|
||||
private String customize = "-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999,-999";
|
||||
|
||||
private String customizeFlag = "-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1";
|
||||
|
||||
private int skin = -1;
|
||||
|
||||
private int buttonSe = -1;
|
||||
|
||||
private int slideSe = -1;
|
||||
|
||||
private int chainSlideSe = -1;
|
||||
|
||||
private int sliderTouchSe = -1;
|
||||
|
||||
public PlayerPvCustomize(PlayerProfile pdId, int pvId) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
}
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ChallengeKind;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.ClearResult;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Difficulty;
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerPvRecord")
|
||||
@Table(name = "diva_player_pv_record", uniqueConstraints = {@UniqueConstraint(columnNames = {"pd_id", "pv_id", "edition", "difficulty"})})
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class PlayerPvRecord implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
@JsonIgnore
|
||||
private PlayerProfile pdId;
|
||||
|
||||
@Column(name = "pv_id")
|
||||
private int pvId = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Edition edition = Edition.ORIGINAL;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private Difficulty difficulty = Difficulty.NORMAL;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ClearResult result = ClearResult.NO_CLEAR;
|
||||
|
||||
private int maxScore = -1;
|
||||
|
||||
private int maxAttain = -1;
|
||||
|
||||
@Enumerated(EnumType.STRING)
|
||||
private ChallengeKind challengeKind = ChallengeKind.UNDEFINED;
|
||||
|
||||
private String rgoPurchased = "0,0,0";
|
||||
|
||||
private String rgoPlayed = "0,0,0";
|
||||
|
||||
public PlayerPvRecord(int pvId, Edition edition) {
|
||||
this.pvId = pvId;
|
||||
this.edition = edition;
|
||||
}
|
||||
|
||||
public PlayerPvRecord(PlayerProfile pdId, int pvId, Edition edition, Difficulty difficulty) {
|
||||
this.pdId = pdId;
|
||||
this.pvId = pvId;
|
||||
this.edition = edition;
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.userdata;
|
||||
|
||||
import jakarta.persistence.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "DivaPlayerScreenShot")
|
||||
@Table(name = "diva_player_screen_shot")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PlayerScreenShot {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
private long id;
|
||||
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "pd_id")
|
||||
private PlayerProfile pdId;
|
||||
|
||||
private long pvId;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String moduleList;
|
||||
|
||||
private String customizeList;
|
||||
|
||||
public PlayerScreenShot(PlayerProfile pdId, String fileName, long pvId, String moduleList, String customizeList) {
|
||||
this.pdId = pdId;
|
||||
this.fileName = fileName;
|
||||
this.pvId = pvId;
|
||||
this.moduleList = moduleList;
|
||||
this.customizeList = customizeList;
|
||||
}
|
||||
}
|
||||
@ -6,7 +6,7 @@ import com.fasterxml.jackson.databind.ser.std.StdSerializer
|
||||
import icu.samnyan.aqua.sega.diva.PlayerPvRecordRepository
|
||||
import icu.samnyan.aqua.sega.diva.model.common.Edition
|
||||
import icu.samnyan.aqua.sega.diva.model.common.LevelInfo
|
||||
import icu.samnyan.aqua.sega.diva.model.userdata.PlayerProfile
|
||||
import icu.samnyan.aqua.sega.diva.model.db.userdata.PlayerProfile
|
||||
import org.springframework.stereotype.Component
|
||||
import java.net.URLEncoder
|
||||
import java.nio.charset.StandardCharsets
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user