forked from Cookies_Github_mirror/AquaDX
[cardmaker] Add experimental chusan gacha support
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanGameGacha")
|
||||
@Table(name = "chusan_game_gacha")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameGacha implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private int id;
|
||||
private int gachaId;
|
||||
private String gachaName;
|
||||
private int type;
|
||||
private int kind; // 0
|
||||
@JsonProperty("isCeiling")
|
||||
private boolean isCeiling;
|
||||
private int ceilingCnt;
|
||||
private int changeRateCnt1;
|
||||
private int changeRateCnt2;
|
||||
private LocalDateTime startDate;
|
||||
private LocalDateTime endDate;
|
||||
private LocalDateTime noticeStartDate;
|
||||
private LocalDateTime noticeEndDate;
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanGameGachaCard")
|
||||
@Table(name = "chusan_game_gacha_card")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class GameGachaCard implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonIgnore
|
||||
private int id;
|
||||
private int gachaId;
|
||||
private int cardId;
|
||||
private int rarity;
|
||||
private int weight;
|
||||
@JsonProperty("isPickup")
|
||||
private boolean isPickup;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.gamedata.GameGachaCard;
|
||||
import icu.samnyan.aqua.sega.chusan.model.userdata.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UpsertUserGacha implements Serializable {
|
||||
|
||||
@Nullable
|
||||
private UserData userData;
|
||||
|
||||
@Nullable
|
||||
private UserGacha userGacha;
|
||||
|
||||
@Nullable
|
||||
private List<Object> userCharacterList;
|
||||
|
||||
@Nullable
|
||||
private List<Object> userCardList;
|
||||
|
||||
@Nullable
|
||||
private List<GameGachaCard> gameGachaCardList;
|
||||
|
||||
@Nullable
|
||||
private List<UserItem> userItemList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewCharacterList")
|
||||
private String isNewCharacterList;
|
||||
|
||||
@Nullable
|
||||
@JsonProperty("isNewCardList")
|
||||
private String isNewCardList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.response.data;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserEmoney {
|
||||
|
||||
private int type = 0;
|
||||
private int emoneyCredit = 69;
|
||||
private int emoneyBrand = 2;
|
||||
private int ext1 = 0;
|
||||
private int ext2 = 0;
|
||||
private int ext3 = 0;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package icu.samnyan.aqua.sega.chusan.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;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
@Entity(name = "ChusanUserCardPrintState")
|
||||
@Table(name = "chusan_user_print_state")
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class UserCardPrintState implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Id
|
||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
@JsonProperty("orderId")
|
||||
private long id;
|
||||
|
||||
@JsonIgnore
|
||||
@ManyToOne
|
||||
@JoinColumn(name = "user_id")
|
||||
private UserData user;
|
||||
|
||||
private boolean hasCompleted;
|
||||
private LocalDateTime limitDate;
|
||||
private int placeId;
|
||||
private int cardId;
|
||||
private int gachaId;
|
||||
|
||||
public UserCardPrintState(UserData user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import icu.samnyan.aqua.sega.chusan.model.response.data.UserEmoney;
|
||||
import icu.samnyan.aqua.sega.general.model.Card;
|
||||
import icu.samnyan.aqua.sega.util.jackson.AccessCodeSerializer;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -13,6 +16,7 @@ import lombok.NoArgsConstructor;
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
@@ -328,11 +332,17 @@ public class UserData implements Serializable {
|
||||
|
||||
private long extLong2;
|
||||
|
||||
private String rankUpChallengeResults;
|
||||
@JsonInclude
|
||||
@Transient
|
||||
private List<Object> rankUpChallengeResults;
|
||||
|
||||
@JsonProperty("isNetBattleHost")
|
||||
private boolean isNetBattleHost;
|
||||
|
||||
private int netBattleEndState;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Transient
|
||||
private UserEmoney userEmoney;
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package icu.samnyan.aqua.sega.chusan.model.userdata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
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 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;
|
||||
|
||||
@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;
|
||||
|
||||
public UserGacha(UserData user) {
|
||||
this.user = user;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user