forked from Cookies_Github_mirror/AquaDX
[ongeki]
Save UserMissionPoint, UserTrainingRoom, UserGeneralData Add GamePoint, GamePresent, GameReward to database Add custom maintenance time to database Save the battle point and rating info send by the game to database [api] Read user_general_data table
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public enum GpProductID {
|
||||
A_Credit1(0),
|
||||
A_Credit2(1),
|
||||
A_Credit3(2),
|
||||
B_Credit1(3),
|
||||
B_Credit2(4),
|
||||
B_Credit3(5),
|
||||
End(6);
|
||||
|
||||
private int value;
|
||||
|
||||
GpProductID(int i) { this.value = i; }
|
||||
|
||||
@JsonValue
|
||||
public int getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public enum IdListType {
|
||||
Invalid,
|
||||
NgMusic,
|
||||
Recommend;
|
||||
|
||||
@JsonValue
|
||||
public int toValue() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.common;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public enum ItemType {
|
||||
None,
|
||||
Card,
|
||||
NamePlate,
|
||||
Trophy,
|
||||
LimitBreakItem,
|
||||
AlmightyJewel,
|
||||
Money,
|
||||
Music,
|
||||
ProfileVoice,
|
||||
Present,
|
||||
ChapterJewel,
|
||||
GachaTicket,
|
||||
Max;
|
||||
|
||||
@JsonValue
|
||||
public int toValue() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.ongeki.model.common.GpProductID;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiGamePoint")
|
||||
@Table(name = "ongeki_game_point", uniqueConstraints = {@UniqueConstraint(columnNames = {"type"})})
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GamePoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@Enumerated(EnumType.ORDINAL)
|
||||
private GpProductID type;
|
||||
|
||||
private int cost;
|
||||
|
||||
private String startDate = "2000-01-01 05:00:00.0";
|
||||
|
||||
private String endDate = "2099-01-01 05:00:00.0";
|
||||
|
||||
public GamePoint(GpProductID type, int cost) {
|
||||
this.type = type;
|
||||
this.cost = cost;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.gamedata;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiGamePresent")
|
||||
@Table(name = "ongeki_game_present")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GamePresent implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
private long presentId;
|
||||
|
||||
private String presentName;
|
||||
|
||||
private int rewardId;
|
||||
|
||||
// count
|
||||
private int stock;
|
||||
|
||||
// acquisitionCondition
|
||||
private String message;
|
||||
|
||||
private String startDate = "2000-01-01 05:00:00.0";
|
||||
|
||||
private String endDate = "2099-01-01 05:00:00.0";
|
||||
|
||||
public GamePresent(int presentId, String presentName, int rewardId, int stock, String message) {
|
||||
this.presentId = presentId;
|
||||
this.presentName = presentName;
|
||||
this.rewardId = rewardId;
|
||||
this.stock = stock;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import icu.samnyan.aqua.sega.ongeki.model.common.ItemType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiGameReward")
|
||||
@Table(name = "ongeki_game_reward")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class GameReward implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@Column(name = "id")
|
||||
private long rewardId;
|
||||
|
||||
@Enumerated(EnumType.ORDINAL)
|
||||
private ItemType itemKind;
|
||||
|
||||
private int itemId;
|
||||
|
||||
public GameReward(int rewardId, ItemType itemKind, int itemId) {
|
||||
this.rewardId = rewardId;
|
||||
this.itemKind = itemKind;
|
||||
this.itemId = itemId;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.response.data;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* Fro getGameRanking request
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameRankingItem {
|
||||
private long id;
|
||||
// this 2 field never use in game code,
|
||||
// maybe for the future update like in game player ranking
|
||||
private long point;
|
||||
private String userName;
|
||||
}
|
||||
@@ -18,8 +18,8 @@ public class GameSetting {
|
||||
@JsonProperty("isMaintenance")
|
||||
private boolean isMaintenance;
|
||||
private int requestInterval;
|
||||
private LocalDateTime rebootStartTime;
|
||||
private LocalDateTime rebootEndTime;
|
||||
private String rebootStartTime;
|
||||
private String rebootEndTime;
|
||||
@JsonProperty("isBackgroundDistribute")
|
||||
private boolean isBackgroundDistribute;
|
||||
private int maxCountCharacter;
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.response.data;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserEventRankingItem {
|
||||
private int eventId;
|
||||
private int type;
|
||||
private String date;
|
||||
private int rank;
|
||||
private long point;
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* For chapter event.
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiUserEventPoint")
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* This is for storing some data only use in aqua
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiUserGeneralData")
|
||||
@Table(name = "ongeki_user_general_data")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserGeneralData implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private String propertyKey;
|
||||
|
||||
private String propertyValue;
|
||||
|
||||
public UserGeneralData(UserData userData, String key) {
|
||||
this.user = userData;
|
||||
this.propertyKey = key;
|
||||
this.propertyValue = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package icu.samnyan.aqua.sega.ongeki.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* For mission event
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "OngekiUserMissionPoint")
|
||||
@Table(name = "ongeki_user_mission_point")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserMissionPoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private int eventId;
|
||||
|
||||
private long point;
|
||||
|
||||
public UserMissionPoint(UserData userData) {
|
||||
this.user = userData;
|
||||
}
|
||||
}
|
||||
@@ -38,4 +38,7 @@ public class UserTrainingRoom implements Serializable {
|
||||
|
||||
public String valueDate;
|
||||
|
||||
public UserTrainingRoom(UserData userData) {
|
||||
this.user = userData;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user