forked from Cookies_Github_mirror/AquaDX
[O] Rewrite the rest of chusan in kotlin
This commit is contained in:
@@ -135,6 +135,7 @@ fun LocalDateTime.isoDateTime() = format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
fun String.isoDateTime() = LocalDateTime.parse(this, DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
val URL_SAFE_DT = DateTimeFormatter.ofPattern("yyyy-MM-dd_HH-mm-ss")
|
||||
fun LocalDateTime.urlSafeStr() = format(URL_SAFE_DT)
|
||||
val DATE_2018 = LocalDateTime.parse("2018-01-01T00:00:00")
|
||||
|
||||
val ALT_DATETIME_FORMAT = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
|
||||
fun Str.asDateTime() = try { LocalDateTime.parse(this, DateTimeFormatter.ISO_LOCAL_DATE_TIME) }
|
||||
|
||||
@@ -187,27 +187,6 @@ public class ApiChuniV2PlayerDataController {
|
||||
return false;
|
||||
}
|
||||
|
||||
@PutMapping("song/{id}/favorite")
|
||||
public void updateSongFavorite(@RequestParam String aimeId, @PathVariable String id) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId(aimeId).orElseThrow();
|
||||
UserGeneralData userGeneralData = userGeneralDataService.getByUserAndKey(profile, "favorite_music")
|
||||
.orElseGet(() -> new UserGeneralData(profile, "favorite_music"));
|
||||
List<String> favoriteSongs = new LinkedList<String>(Arrays.asList(userGeneralData.getPropertyValue().split(",")));
|
||||
|
||||
if(!favoriteSongs.remove(id))
|
||||
{
|
||||
favoriteSongs.add(id);
|
||||
}
|
||||
|
||||
StringBuilder sb = new StringBuilder();
|
||||
favoriteSongs.forEach(favSong -> {
|
||||
if(!favSong.isEmpty()) sb.append(favSong).append(",");
|
||||
});
|
||||
|
||||
userGeneralData.setPropertyValue(sb.toString());
|
||||
userGeneralDataService.save(userGeneralData);
|
||||
}
|
||||
|
||||
@GetMapping("character")
|
||||
public ReducedPageResponse<UserCharacter> getCharacter(@RequestParam String aimeId,
|
||||
@RequestParam(required = false, defaultValue = "0") int page,
|
||||
@@ -216,25 +195,6 @@ public class ApiChuniV2PlayerDataController {
|
||||
return new ReducedPageResponse<>(characters.getContent(), characters.getPageable().getPageNumber(), characters.getTotalPages(), characters.getTotalElements());
|
||||
}
|
||||
|
||||
@PostMapping("character")
|
||||
public ResponseEntity<Object> updateCharacter(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
Integer characterId = (Integer) request.get("characterId");
|
||||
Optional<UserCharacter> characterOptional = userCharacterService.getByUserAndCharacterId(profile, characterId);
|
||||
UserCharacter character;
|
||||
if(characterOptional.isPresent()) {
|
||||
character = characterOptional.get();
|
||||
} else {
|
||||
character = new UserCharacter(profile);
|
||||
character.setCharacterId(characterId);
|
||||
}
|
||||
if(request.containsKey("level")) {
|
||||
character.setLevel((Integer) request.get("level"));
|
||||
}
|
||||
|
||||
return ResponseEntity.ok(userCharacterService.save(character));
|
||||
}
|
||||
|
||||
@GetMapping("course")
|
||||
public List<UserCourse> getCourse(@RequestParam String aimeId) {
|
||||
return userCourseService.getByUserId(aimeId);
|
||||
@@ -258,26 +218,6 @@ public class ApiChuniV2PlayerDataController {
|
||||
return userItemService.getByUserAndItemKind(aimeId, itemKind);
|
||||
}
|
||||
|
||||
@PostMapping("item")
|
||||
public ResponseEntity<Object> updateItem(@RequestBody Map<String, Object> request) {
|
||||
Chu3UserData profile = userDataService.getUserByExtId((String) request.get("aimeId")).orElseThrow();
|
||||
Integer itemId = (Integer) request.get("itemId");
|
||||
Integer itemKind = (Integer) request.get("itemKind");
|
||||
Optional<UserItem> itemOptional = userItemService.getByUserAndItemIdAndKind(profile, itemId,itemKind);
|
||||
UserItem item;
|
||||
if(itemOptional.isPresent()) {
|
||||
item = itemOptional.get();
|
||||
} else {
|
||||
item = new UserItem(profile);
|
||||
item.setItemId(itemId);
|
||||
item.setItemKind(itemKind);
|
||||
}
|
||||
if(request.containsKey("stock")) {
|
||||
item.setStock((Integer) request.get("stock"));
|
||||
}
|
||||
return ResponseEntity.ok(userItemService.save(item));
|
||||
}
|
||||
|
||||
@GetMapping("general")
|
||||
public ResponseEntity<Object> getGeneralData(@RequestParam String aimeId, @RequestParam String key) {
|
||||
Optional<UserGeneralData> userGeneralDataOptional = userGeneralDataService.getByUserIdAndKey(aimeId,key);
|
||||
|
||||
@@ -75,7 +75,7 @@ public class CMUpsertUserGachaHandler implements BaseHandler {
|
||||
int itemKind = newUserItem.getItemKind();
|
||||
|
||||
Optional<UserItem> userItemOptional = userItemService.getByUserAndItemIdAndKind(userData, itemId, itemKind);
|
||||
UserItem userItem = userItemOptional.orElseGet(() -> new UserItem(userData));
|
||||
UserItem userItem = userItemOptional.orElseGet(() -> new UserItem());
|
||||
|
||||
newUserItem.setId(userItem.getId());
|
||||
newUserItem.setUser(userItem.getUser());
|
||||
|
||||
@@ -54,7 +54,7 @@ public class CMUpsertUserPrintSubtractHandler implements BaseHandler {
|
||||
int itemKind = newUserItem.getItemKind();
|
||||
|
||||
Optional<UserItem> userItemOptional = userItemService.getByUserAndItemIdAndKind(userData, itemId, itemKind);
|
||||
UserItem userItem = userItemOptional.orElseGet(() -> new UserItem(userData));
|
||||
UserItem userItem = userItemOptional.orElseGet(() -> new UserItem());
|
||||
|
||||
newUserItem.setId(userItem.getId());
|
||||
newUserItem.setUser(userItem.getUser());
|
||||
|
||||
@@ -55,12 +55,7 @@ class GameLoginHandler(
|
||||
else finished = true
|
||||
}
|
||||
db.gameLoginBonus.findByRequiredDays(1, preset.id, bCount)()?.let {
|
||||
db.userItem.save(UserItem(u).apply {
|
||||
itemId = it.presentId
|
||||
itemKind = 6
|
||||
stock = it.itemNum
|
||||
isValid = true
|
||||
})
|
||||
db.userItem.save(UserItem(6, it.presentId, it.itemNum).apply { user = u })
|
||||
}
|
||||
val toSave = db.userLoginBonus.findLoginBonus(uid.int, 1, preset.id)()
|
||||
?: UserLoginBonus().apply { user = uid.int; presetId = preset.id; version = 1 }
|
||||
|
||||
@@ -8,9 +8,9 @@ import jakarta.persistence.ManyToOne
|
||||
import jakarta.persistence.MappedSuperclass
|
||||
|
||||
@MappedSuperclass
|
||||
open class Chu3UserEntity : BaseEntity(), IUserEntity<Chu3UserData> {
|
||||
class Chu3UserEntity : BaseEntity(), IUserEntity<Chu3UserData> {
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
public override var user: Chu3UserData = Chu3UserData()
|
||||
override var user: Chu3UserData = Chu3UserData()
|
||||
}
|
||||
@@ -1,15 +1,11 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
|
||||
@Entity(name = "ChusanUserCMission")
|
||||
@Table(name = "chusan_user_cmission")
|
||||
class UserCMission : Chu3UserEntity() {
|
||||
@Column(name = "mission_id")
|
||||
var missionId = 0
|
||||
|
||||
@Column(name = "point")
|
||||
var point = 0
|
||||
}
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCharacter")
|
||||
@Table(name = "chusan_user_character", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "character_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"characterId", "playCount", "level", "friendshipExp", "isValid", "isNewMark", "exMaxLv", "assignIllust", "param1", "param2"})
|
||||
public class UserCharacter extends Chu3UserEntity {
|
||||
@Column(name = "character_id")
|
||||
private int characterId;
|
||||
|
||||
private int playCount = 0;
|
||||
|
||||
private int level = 1;
|
||||
|
||||
private int friendshipExp = 0;
|
||||
|
||||
@JsonProperty("isValid")
|
||||
private boolean isValid = true;
|
||||
|
||||
@JsonProperty("isNewMark")
|
||||
private boolean isNewMark = true;
|
||||
|
||||
private int exMaxLv = 0;
|
||||
|
||||
private int assignIllust = 0;
|
||||
|
||||
private int param1 = 0;
|
||||
|
||||
private int param2 = 0;
|
||||
|
||||
public UserCharacter(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
|
||||
@Entity(name = "ChusanUserCharacter")
|
||||
@Table(name = "chusan_user_character", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "character_id"])])
|
||||
class UserCharacter : Chu3UserEntity() {
|
||||
@Column(name = "character_id")
|
||||
var characterId = 0
|
||||
val playCount = 0
|
||||
val level = 1
|
||||
val friendshipExp = 0
|
||||
@JsonProperty("isValid")
|
||||
val isValid = true
|
||||
@JsonProperty("isNewMark")
|
||||
val isNewMark = true
|
||||
val exMaxLv = 0
|
||||
val assignIllust = 0
|
||||
val param1 = 0
|
||||
val param2 = 0
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCharge")
|
||||
@Table(name = "chusan_user_charge", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "charge_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"chargeId", "stock", "purchaseDate", "validDate", "param1", "param2", "paramDate"})
|
||||
public class UserCharge extends Chu3UserEntity {
|
||||
@Column(name = "charge_id")
|
||||
private int chargeId;
|
||||
|
||||
private int stock;
|
||||
|
||||
private LocalDateTime purchaseDate;
|
||||
|
||||
private LocalDateTime validDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private LocalDateTime paramDate;
|
||||
|
||||
public UserCharge(Chu3UserData user) {
|
||||
setUser(user);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserCharge")
|
||||
@Table(name = "chusan_user_charge", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "charge_id"])])
|
||||
class UserCharge : Chu3UserEntity() {
|
||||
var chargeId = 0
|
||||
var stock = 0
|
||||
var purchaseDate: LocalDateTime? = null
|
||||
var validDate: LocalDateTime? = null
|
||||
var param1 = 0
|
||||
var param2 = 0
|
||||
var paramDate: LocalDateTime? = null
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCourse")
|
||||
@Table(name = "chusan_user_course", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "course_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserCourse extends Chu3UserEntity {
|
||||
@Column(name = "course_id")
|
||||
private int courseId;
|
||||
|
||||
private int classId;
|
||||
|
||||
private int playCount;
|
||||
|
||||
private int theoryCount;
|
||||
|
||||
private int scoreMax;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonProperty("isSuccess")
|
||||
private boolean isSuccess;
|
||||
|
||||
private int scoreRank;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private LocalDateTime lastPlayDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private int param3;
|
||||
|
||||
private int param4;
|
||||
|
||||
private int orderId;
|
||||
|
||||
private int playerRating;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
public UserCourse(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
|
||||
public UserCourse(int classId) {
|
||||
this.classId = classId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserCourse")
|
||||
@Table(name = "chusan_user_course", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "course_id"])])
|
||||
class UserCourse : Chu3UserEntity() {
|
||||
var courseId = 0
|
||||
var classId = 0
|
||||
var playCount = 0
|
||||
var theoryCount = 0
|
||||
var scoreMax = 0
|
||||
@JsonProperty("isFullCombo")
|
||||
var isFullCombo = false
|
||||
@JsonProperty("isAllJustice")
|
||||
var isAllJustice = false
|
||||
@JsonProperty("isSuccess")
|
||||
var isSuccess = false
|
||||
var scoreRank = 0
|
||||
var eventId = 0
|
||||
var lastPlayDate: LocalDateTime? = null
|
||||
var param1 = 0
|
||||
var param2 = 0
|
||||
var param3 = 0
|
||||
var param4 = 0
|
||||
var orderId = 0
|
||||
var playerRating = 0
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserDuel")
|
||||
@Table(name = "chusan_user_duel", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "duel_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserDuel extends Chu3UserEntity {
|
||||
@Column(name = "duel_id")
|
||||
private int duelId;
|
||||
|
||||
private int progress;
|
||||
|
||||
private int point;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private LocalDateTime lastPlayDate;
|
||||
|
||||
private int param1;
|
||||
|
||||
private int param2;
|
||||
|
||||
private int param3;
|
||||
|
||||
private int param4;
|
||||
|
||||
public UserDuel(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserDuel")
|
||||
@Table(name = "chusan_user_duel", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "duel_id"])])
|
||||
class UserDuel : Chu3UserEntity() {
|
||||
@Column(name = "duel_id")
|
||||
var duelId = 0
|
||||
var progress = 0
|
||||
var point = 0
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
var lastPlayDate: LocalDateTime? = null
|
||||
var param1 = 0
|
||||
var param2 = 0
|
||||
var param3 = 0
|
||||
var param4 = 0
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserGacha")
|
||||
@Table(name = "chusan_user_gacha", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "gacha_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserGacha extends Chu3UserEntity {
|
||||
@Column(name = "gacha_id")
|
||||
private int gachaId;
|
||||
|
||||
private int totalGachaCnt;
|
||||
|
||||
private int ceilingGachaCnt;
|
||||
|
||||
private int dailyGachaCnt;
|
||||
|
||||
private int fiveGachaCnt;
|
||||
|
||||
private int elevenGachaCnt;
|
||||
|
||||
private LocalDateTime dailyGachaDate;
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserGacha")
|
||||
@Table(name = "chusan_user_gacha")
|
||||
class UserGacha : Chu3UserEntity() {
|
||||
var gachaId = 0
|
||||
var totalGachaCnt = 0
|
||||
var ceilingGachaCnt = 0
|
||||
var dailyGachaCnt = 0
|
||||
var fiveGachaCnt = 0
|
||||
var elevenGachaCnt = 0
|
||||
var dailyGachaDate: LocalDateTime? = null
|
||||
}
|
||||
@@ -1,175 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserGameOption")
|
||||
@Table(name = "chusan_user_game_option")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"bgInfo",
|
||||
"fieldColor",
|
||||
"guideSound",
|
||||
"soundEffect",
|
||||
"guideLine",
|
||||
"speed",
|
||||
"optionSet",
|
||||
"matching",
|
||||
"judgePos",
|
||||
"rating",
|
||||
"judgeCritical",
|
||||
"judgeJustice",
|
||||
"judgeAttack",
|
||||
"headphone",
|
||||
"playerLevel",
|
||||
"successTap",
|
||||
"successExTap",
|
||||
"successSlideHold",
|
||||
"successAir",
|
||||
"successFlick",
|
||||
"successSkill",
|
||||
"successTapTimbre",
|
||||
"privacy",
|
||||
"mirrorFumen",
|
||||
"selectMusicFilterLv",
|
||||
"sortMusicFilterLv",
|
||||
"sortMusicGenre",
|
||||
"categoryDetail",
|
||||
"judgeTimingOffset",
|
||||
"playTimingOffset",
|
||||
"fieldWallPosition",
|
||||
"resultVoiceShort",
|
||||
"notesThickness",
|
||||
"judgeAppendSe",
|
||||
"trackSkip",
|
||||
"hardJudge",
|
||||
"speed_120",
|
||||
"fieldWallPosition_120",
|
||||
"playTimingOffset_120",
|
||||
"judgeTimingOffset_120",
|
||||
"ext1",
|
||||
"ext2",
|
||||
"ext3",
|
||||
"ext4",
|
||||
"ext5",
|
||||
"ext6",
|
||||
"ext7",
|
||||
"ext8",
|
||||
"ext9",
|
||||
"ext10"
|
||||
})
|
||||
public class UserGameOption extends Chu3UserEntity {
|
||||
|
||||
private int bgInfo;
|
||||
|
||||
private int fieldColor;
|
||||
|
||||
private int guideSound;
|
||||
|
||||
private int soundEffect;
|
||||
|
||||
private int guideLine;
|
||||
|
||||
private int speed;
|
||||
|
||||
private int optionSet;
|
||||
|
||||
private int matching;
|
||||
|
||||
private int judgePos;
|
||||
|
||||
private int rating;
|
||||
|
||||
private int judgeCritical;
|
||||
|
||||
private int judgeJustice;
|
||||
|
||||
private int judgeAttack;
|
||||
|
||||
private int headphone;
|
||||
|
||||
private int playerLevel;
|
||||
|
||||
private int successTap;
|
||||
|
||||
private int successExTap;
|
||||
|
||||
private int successSlideHold;
|
||||
|
||||
private int successAir;
|
||||
|
||||
private int successFlick;
|
||||
|
||||
private int successSkill;
|
||||
|
||||
private int successTapTimbre;
|
||||
|
||||
private int privacy;
|
||||
|
||||
private int mirrorFumen;
|
||||
|
||||
private int selectMusicFilterLv;
|
||||
|
||||
private int sortMusicFilterLv;
|
||||
|
||||
private int sortMusicGenre;
|
||||
|
||||
private int categoryDetail;
|
||||
|
||||
private int judgeTimingOffset;
|
||||
|
||||
private int playTimingOffset;
|
||||
|
||||
private int fieldWallPosition;
|
||||
|
||||
private int resultVoiceShort;
|
||||
|
||||
private int notesThickness;
|
||||
|
||||
private int judgeAppendSe;
|
||||
|
||||
private int trackSkip;
|
||||
|
||||
private int hardJudge;
|
||||
|
||||
private int speed_120;
|
||||
|
||||
private int fieldWallPosition_120;
|
||||
|
||||
private int playTimingOffset_120;
|
||||
|
||||
private int judgeTimingOffset_120;
|
||||
|
||||
private int ext1;
|
||||
|
||||
private int ext2;
|
||||
|
||||
private int ext3;
|
||||
|
||||
private int ext4;
|
||||
|
||||
private int ext5;
|
||||
|
||||
private int ext6;
|
||||
|
||||
private int ext7;
|
||||
|
||||
private int ext8;
|
||||
|
||||
private int ext9;
|
||||
|
||||
private int ext10;
|
||||
|
||||
public UserGameOption(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
|
||||
@Entity(name = "ChusanUserGameOption")
|
||||
@Table(name = "chusan_user_game_option")
|
||||
class UserGameOption : Chu3UserEntity() {
|
||||
var bgInfo = 0
|
||||
var fieldColor = 0
|
||||
var guideSound = 0
|
||||
var soundEffect = 0
|
||||
var guideLine = 0
|
||||
var speed = 0
|
||||
var optionSet = 0
|
||||
var matching = 0
|
||||
var judgePos = 0
|
||||
var rating = 0
|
||||
var judgeCritical = 0
|
||||
var judgeJustice = 0
|
||||
var judgeAttack = 0
|
||||
var headphone = 0
|
||||
var playerLevel = 0
|
||||
var successTap = 0
|
||||
var successExTap = 0
|
||||
var successSlideHold = 0
|
||||
var successAir = 0
|
||||
var successFlick = 0
|
||||
var successSkill = 0
|
||||
var successTapTimbre = 0
|
||||
var privacy = 0
|
||||
var mirrorFumen = 0
|
||||
var selectMusicFilterLv = 0
|
||||
var sortMusicFilterLv = 0
|
||||
var sortMusicGenre = 0
|
||||
var categoryDetail = 0
|
||||
var judgeTimingOffset = 0
|
||||
var playTimingOffset = 0
|
||||
var fieldWallPosition = 0
|
||||
var resultVoiceShort = 0
|
||||
var notesThickness = 0
|
||||
var judgeAppendSe = 0
|
||||
var trackSkip = 0
|
||||
var hardJudge = 0
|
||||
var speed_120 = 0
|
||||
var fieldWallPosition_120 = 0
|
||||
var playTimingOffset_120 = 0
|
||||
var judgeTimingOffset_120 = 0
|
||||
var ext1 = 0
|
||||
var ext2 = 0
|
||||
var ext3 = 0
|
||||
var ext4 = 0
|
||||
var ext5 = 0
|
||||
var ext6 = 0
|
||||
var ext7 = 0
|
||||
var ext8 = 0
|
||||
var ext9 = 0
|
||||
var ext10 = 0
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* This is for storing the other data that doesn't need to save it in a separate table
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserGeneralData")
|
||||
@Table(name = "chusan_user_general_data")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserGeneralData extends Chu3UserEntity {
|
||||
private String propertyKey;
|
||||
|
||||
@Column(columnDefinition = "TEXT")
|
||||
private String propertyValue;
|
||||
|
||||
public UserGeneralData(Chu3UserData userData, String key) {
|
||||
setUser(userData);
|
||||
this.propertyKey = key;
|
||||
this.propertyValue = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
|
||||
@Entity(name = "ChusanUserGeneralData")
|
||||
@Table(name = "chusan_user_general_data")
|
||||
class UserGeneralData(
|
||||
@Column(columnDefinition = "TEXT")
|
||||
var propertyValue: String = "",
|
||||
var propertyKey: String = "",
|
||||
) : Chu3UserEntity()
|
||||
@@ -1,38 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserItem")
|
||||
@Table(name = "chusan_user_item", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "item_id", "item_kind"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({"itemKind", "itemId", "stock", "isValid"})
|
||||
public class UserItem extends Chu3UserEntity {
|
||||
// Kind ,Type
|
||||
@Column(name = "item_kind")
|
||||
private int itemKind;
|
||||
|
||||
@Column(name = "item_id")
|
||||
private int itemId;
|
||||
|
||||
private int stock = 1;
|
||||
|
||||
@JsonProperty("isValid")
|
||||
private boolean isValid = true;
|
||||
|
||||
public UserItem(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
|
||||
@Entity(name = "ChusanUserItem")
|
||||
@Table(name = "chusan_user_item", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "item_id", "item_kind"])])
|
||||
class UserItem(
|
||||
var itemKind: Int = 0,
|
||||
var itemId: Int = 0,
|
||||
val stock: Int = 1,
|
||||
@JsonProperty("isValid")
|
||||
val isValid: Boolean = true
|
||||
) : Chu3UserEntity()
|
||||
@@ -1,35 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import icu.samnyan.aqua.net.games.BaseEntity;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Entity(name = "ChusanUserLoginBonus")
|
||||
@Table(name = "chusan_user_login_bonus")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserLoginBonus extends BaseEntity {
|
||||
private int version;
|
||||
private int user;
|
||||
private int presetId;
|
||||
private int bonusCount;
|
||||
private LocalDateTime lastUpdateDate;
|
||||
private boolean isWatched;
|
||||
private boolean isFinished;
|
||||
|
||||
public UserLoginBonus(int version, int user, int presetId) {
|
||||
this.version = version;
|
||||
this.user = user;
|
||||
this.presetId = presetId;
|
||||
this.bonusCount = 0;
|
||||
this.lastUpdateDate = LocalDateTime.parse("2018-01-01T00:00:00");
|
||||
this.isWatched = false;
|
||||
this.isFinished = false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import ext.DATE_2018
|
||||
import icu.samnyan.aqua.net.games.BaseEntity
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserLoginBonus")
|
||||
@Table(name = "chusan_user_login_bonus")
|
||||
class UserLoginBonus(
|
||||
var version: Int = 0,
|
||||
var user: Int = 0,
|
||||
var presetId: Int = 0,
|
||||
var bonusCount: Int = 0,
|
||||
var lastUpdateDate: LocalDateTime = DATE_2018,
|
||||
var isWatched: Boolean = false, // TODO: Check if this should be "watched" or "isWatched" in json
|
||||
var isFinished: Boolean = false,
|
||||
) : BaseEntity()
|
||||
@@ -1,51 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserMapArea")
|
||||
@Table(name = "chusan_user_map_area", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "map_area_id"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"mapAreaId",
|
||||
"position",
|
||||
"isClear",
|
||||
"rate",
|
||||
"statusCount",
|
||||
"remainGridCount",
|
||||
"isLocked"
|
||||
})
|
||||
public class UserMap extends Chu3UserEntity {
|
||||
@Column(name = "map_area_id")
|
||||
private int mapAreaId;
|
||||
|
||||
private int position;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private int rate;
|
||||
|
||||
private int statusCount;
|
||||
|
||||
private int remainGridCount;
|
||||
|
||||
@JsonProperty("isLocked")
|
||||
private boolean isLocked;
|
||||
|
||||
public UserMap(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
|
||||
@Entity(name = "ChusanUserMapArea")
|
||||
@Table(name = "chusan_user_map_area", uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "map_area_id"])])
|
||||
class UserMap : Chu3UserEntity() {
|
||||
var mapAreaId = 0
|
||||
var position = 0
|
||||
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
|
||||
var rate = 0
|
||||
var statusCount = 0
|
||||
var remainGridCount = 0
|
||||
|
||||
@JsonProperty("isLocked")
|
||||
var isLocked = false
|
||||
}
|
||||
@@ -1,79 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||
import icu.samnyan.aqua.sega.util.jackson.BooleanToIntegerDeserializer;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import jakarta.persistence.UniqueConstraint;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserMusicDetail")
|
||||
@Table(name = "chusan_user_music_detail", uniqueConstraints = {@UniqueConstraint(columnNames = {"user_id", "music_id", "level"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@JsonPropertyOrder({
|
||||
"musicId",
|
||||
"level",
|
||||
"playCount",
|
||||
"scoreMax",
|
||||
"missCount",
|
||||
"maxComboCount",
|
||||
"isFullCombo",
|
||||
"isAllJustice",
|
||||
"isSuccess",
|
||||
"fullChain",
|
||||
"maxChain",
|
||||
"isLock",
|
||||
"theoryCount",
|
||||
"ext1"
|
||||
})
|
||||
public class UserMusicDetail extends Chu3UserEntity {
|
||||
@Column(name = "music_id")
|
||||
private int musicId;
|
||||
|
||||
private int level;
|
||||
|
||||
private int playCount;
|
||||
|
||||
private int scoreMax;
|
||||
|
||||
private int missCount;
|
||||
|
||||
private int maxComboCount;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonDeserialize(using = BooleanToIntegerDeserializer.class)
|
||||
@JsonProperty("isSuccess")
|
||||
private int isSuccess;
|
||||
|
||||
private int fullChain;
|
||||
|
||||
private int maxChain;
|
||||
|
||||
private int scoreRank;
|
||||
|
||||
@JsonProperty("isLock")
|
||||
private boolean isLock;
|
||||
|
||||
private int theoryCount;
|
||||
|
||||
private int ext1;
|
||||
|
||||
public UserMusicDetail(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
|
||||
import icu.samnyan.aqua.sega.util.jackson.BooleanToIntegerDeserializer
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import jakarta.persistence.UniqueConstraint
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserMusicDetail")
|
||||
@Table(
|
||||
name = "chusan_user_music_detail",
|
||||
uniqueConstraints = [UniqueConstraint(columnNames = ["user_id", "music_id", "level"])]
|
||||
)
|
||||
class UserMusicDetail : Chu3UserEntity() {
|
||||
var musicId = 0
|
||||
var level = 0
|
||||
var playCount = 0
|
||||
var scoreMax = 0
|
||||
var missCount = 0
|
||||
var maxComboCount = 0
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
var isFullCombo = false
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
var isAllJustice = false
|
||||
|
||||
@JsonDeserialize(using = BooleanToIntegerDeserializer::class)
|
||||
@JsonProperty("isSuccess")
|
||||
var isSuccess = 0
|
||||
|
||||
var fullChain = 0
|
||||
var maxChain = 0
|
||||
var scoreRank = 0
|
||||
|
||||
@JsonProperty("isLock")
|
||||
var isLock = false
|
||||
|
||||
var theoryCount = 0
|
||||
var ext1 = 0
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import icu.samnyan.aqua.net.games.IGenericGamePlaylog;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Table;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserPlaylog")
|
||||
@Table(name = "chusan_user_playlog")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserPlaylog extends Chu3UserEntity implements IGenericGamePlaylog {
|
||||
private String romVersion;
|
||||
|
||||
private int orderId;
|
||||
|
||||
private int sortNumber;
|
||||
|
||||
private int placeId;
|
||||
|
||||
private LocalDateTime playDate;
|
||||
|
||||
private LocalDateTime userPlayDate;
|
||||
|
||||
private int musicId;
|
||||
|
||||
private int level;
|
||||
|
||||
private int customId;
|
||||
|
||||
private long playedUserId1;
|
||||
|
||||
private long playedUserId2;
|
||||
|
||||
private long playedUserId3;
|
||||
|
||||
private String playedUserName1;
|
||||
|
||||
private String playedUserName2;
|
||||
|
||||
private String playedUserName3;
|
||||
|
||||
private int playedMusicLevel1;
|
||||
|
||||
private int playedMusicLevel2;
|
||||
|
||||
private int playedMusicLevel3;
|
||||
|
||||
private int playedCustom1;
|
||||
|
||||
private int playedCustom2;
|
||||
|
||||
private int playedCustom3;
|
||||
|
||||
private int track;
|
||||
|
||||
private int score;
|
||||
|
||||
@Column(name = "\"rank\"")
|
||||
private int rank;
|
||||
|
||||
private int maxCombo;
|
||||
|
||||
private int maxChain;
|
||||
|
||||
private int rateTap;
|
||||
|
||||
private int rateHold;
|
||||
|
||||
private int rateSlide;
|
||||
|
||||
private int rateAir;
|
||||
|
||||
private int rateFlick;
|
||||
|
||||
private int judgeGuilty;
|
||||
|
||||
private int judgeAttack;
|
||||
|
||||
private int judgeJustice;
|
||||
|
||||
private int judgeCritical;
|
||||
|
||||
private int judgeHeaven;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private int playerRating;
|
||||
|
||||
@JsonProperty("isNewRecord")
|
||||
private boolean isNewRecord;
|
||||
|
||||
@JsonProperty("isFullCombo")
|
||||
private boolean isFullCombo;
|
||||
|
||||
private int fullChainKind;
|
||||
|
||||
@JsonProperty("isAllJustice")
|
||||
private boolean isAllJustice;
|
||||
|
||||
@JsonProperty("isContinue")
|
||||
private boolean isContinue;
|
||||
|
||||
@JsonProperty("isFreeToPlay")
|
||||
private boolean isFreeToPlay;
|
||||
|
||||
private int characterId;
|
||||
|
||||
private int charaIllustId;
|
||||
|
||||
private int skillId;
|
||||
|
||||
private int playKind;
|
||||
|
||||
@JsonProperty("isClear")
|
||||
private boolean isClear;
|
||||
|
||||
private int skillLevel;
|
||||
|
||||
private int skillEffect;
|
||||
|
||||
private String placeName;
|
||||
|
||||
private int commonId;
|
||||
|
||||
// SUN
|
||||
private int regionId;
|
||||
|
||||
private int machineType;
|
||||
|
||||
// SUN PLUS
|
||||
private int ticketId;
|
||||
|
||||
public UserPlaylog(Chu3UserData userData) {
|
||||
setUser(userData);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAchievement() {
|
||||
return score;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAfterRating() {
|
||||
return playerRating;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getBeforeRating() {
|
||||
return playerRating; // TODO: Get before rating
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAllPerfect() {
|
||||
return isAllJustice;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty
|
||||
import icu.samnyan.aqua.net.games.IGenericGamePlaylog
|
||||
import jakarta.persistence.Column
|
||||
import jakarta.persistence.Entity
|
||||
import jakarta.persistence.Table
|
||||
import java.time.LocalDateTime
|
||||
|
||||
@Entity(name = "ChusanUserPlaylog")
|
||||
@Table(name = "chusan_user_playlog")
|
||||
class UserPlaylog : Chu3UserEntity(), IGenericGamePlaylog {
|
||||
var romVersion: String? = null
|
||||
var orderId = 0
|
||||
var sortNumber = 0
|
||||
var placeId = 0
|
||||
var playDate: LocalDateTime? = null
|
||||
override var userPlayDate: LocalDateTime = LocalDateTime.now()
|
||||
override var musicId: Int = 0
|
||||
override var level: Int = 0
|
||||
var customId = 0
|
||||
var playedUserId1: Long = 0
|
||||
var playedUserId2: Long = 0
|
||||
var playedUserId3: Long = 0
|
||||
var playedUserName1: String? = null
|
||||
var playedUserName2: String? = null
|
||||
var playedUserName3: String? = null
|
||||
var playedMusicLevel1 = 0
|
||||
var playedMusicLevel2 = 0
|
||||
var playedMusicLevel3 = 0
|
||||
var playedCustom1 = 0
|
||||
var playedCustom2 = 0
|
||||
var playedCustom3 = 0
|
||||
var track = 0
|
||||
var score = 0
|
||||
@Column(name = "\"rank\"")
|
||||
var rank = 0
|
||||
override var maxCombo: Int = 0
|
||||
var maxChain = 0
|
||||
var rateTap = 0
|
||||
var rateHold = 0
|
||||
var rateSlide = 0
|
||||
var rateAir = 0
|
||||
var rateFlick = 0
|
||||
var judgeGuilty = 0
|
||||
var judgeAttack = 0
|
||||
var judgeJustice = 0
|
||||
var judgeCritical = 0
|
||||
var judgeHeaven = 0
|
||||
var eventId = 0
|
||||
var playerRating = 0
|
||||
@JsonProperty("isNewRecord")
|
||||
var isNewRecord = false
|
||||
@JsonProperty("isFullCombo")
|
||||
override var isFullCombo: Boolean = false
|
||||
var fullChainKind = 0
|
||||
@JsonProperty("isAllJustice")
|
||||
var isAllJustice = false
|
||||
@JsonProperty("isContinue")
|
||||
var isContinue = false
|
||||
@JsonProperty("isFreeToPlay")
|
||||
var isFreeToPlay = false
|
||||
var characterId = 0
|
||||
var charaIllustId = 0
|
||||
var skillId = 0
|
||||
var playKind = 0
|
||||
@JsonProperty("isClear")
|
||||
var isClear = false
|
||||
var skillLevel = 0
|
||||
var skillEffect = 0
|
||||
var placeName: String? = null
|
||||
var commonId = 0
|
||||
var regionId = 0
|
||||
var machineType = 0
|
||||
var ticketId = 0
|
||||
|
||||
override val achievement: Int get() = score
|
||||
override val afterRating: Int get() = playerRating
|
||||
override val beforeRating: Int get() = playerRating // TODO: Implement this
|
||||
override val isAllPerfect: Boolean get() = isAllJustice
|
||||
}
|
||||
Reference in New Issue
Block a user