forked from Cookies_Github_mirror/AquaDX
[API] Let web music list read from database
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package icu.samnyan.aqua.sega.diva.dao.gamedata;
|
||||
|
||||
import icu.samnyan.aqua.sega.diva.model.gamedata.Pv;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
/**
|
||||
* @author samnyan (privateamusement@protonmail.com)
|
||||
*/
|
||||
public interface DivaPvRepository extends JpaRepository<Pv, Integer> {
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package icu.samnyan.aqua.sega.diva.model.gamedata;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.persistence.*;
|
||||
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;
|
||||
}
|
||||
Reference in New Issue
Block a user