diff --git a/src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/Chu3NetBattleLog.kt b/src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/Chu3NetBattleLog.kt index d1d26396..7d8551fb 100644 --- a/src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/Chu3NetBattleLog.kt +++ b/src/main/java/icu/samnyan/aqua/sega/chusan/model/userdata/Chu3NetBattleLog.kt @@ -1,7 +1,10 @@ package icu.samnyan.aqua.sega.chusan.model.userdata -//@Entity(name = "ChusanNetBattleLog") -//@Table(name = "chusan_net_battle_log") +import jakarta.persistence.Entity +import jakarta.persistence.Table + +@Entity(name = "ChusanNetBattleLog") +@Table(name = "chusan_net_battle_log") class Chu3NetBattleLog( val roomId: Long = 0, val track: Long = 0, @@ -13,34 +16,34 @@ class Chu3NetBattleLog( val opponentUserName1: String = "", val opponentUserName2: String = "", val opponentUserName3: String = "", - val opponentRegionId1: Long = 0, - val opponentRegionId2: Long = 0, - val opponentRegionId3: Long = 0, - val opponentRating1: Long = 0, - val opponentRating2: Long = 0, - val opponentRating3: Long = 0, - val opponentBattleRankId1: Long = 0, - val opponentBattleRankId2: Long = 0, - val opponentBattleRankId3: Long = 0, - val opponentClassEmblemMedal1: Long = 0, - val opponentClassEmblemMedal2: Long = 0, - val opponentClassEmblemMedal3: Long = 0, - val opponentClassEmblemBase1: Long = 0, - val opponentClassEmblemBase2: Long = 0, - val opponentClassEmblemBase3: Long = 0, - val opponentScore1: Long = 0, - val opponentScore2: Long = 0, - val opponentScore3: Long = 0, - val opponentCharaIllustId1: Long = 0, - val opponentCharaIllustId2: Long = 0, - val opponentCharaIllustId3: Long = 0, - val opponentCharaLv1: Long = 0, - val opponentCharaLv2: Long = 0, - val opponentCharaLv3: Long = 0, - val opponentRatingEffectColorId1: Long = 0, - val opponentRatingEffectColorId2: Long = 0, - val opponentRatingEffectColorId3: Long = 0, - val battleRuleId: Long = 0, - val monthPoLong: Long = 0, - val eventPoLong: Long = 0 + val opponentRegionId1: Int = 0, + val opponentRegionId2: Int = 0, + val opponentRegionId3: Int = 0, + val opponentRating1: Int = 0, + val opponentRating2: Int = 0, + val opponentRating3: Int = 0, + val opponentBattleRankId1: Int = 0, + val opponentBattleRankId2: Int = 0, + val opponentBattleRankId3: Int = 0, + val opponentClassEmblemMedal1: Int = 0, + val opponentClassEmblemMedal2: Int = 0, + val opponentClassEmblemMedal3: Int = 0, + val opponentClassEmblemBase1: Int = 0, + val opponentClassEmblemBase2: Int = 0, + val opponentClassEmblemBase3: Int = 0, + val opponentScore1: Int = 0, + val opponentScore2: Int = 0, + val opponentScore3: Int = 0, + val opponentCharaIllustId1: Int = 0, + val opponentCharaIllustId2: Int = 0, + val opponentCharaIllustId3: Int = 0, + val opponentCharaLv1: Int = 0, + val opponentCharaLv2: Int = 0, + val opponentCharaLv3: Int = 0, + val opponentRatingEffectColorId1: Int = 0, + val opponentRatingEffectColorId2: Int = 0, + val opponentRatingEffectColorId3: Int = 0, + val battleRuleId: Int = 0, + val monthPoLong: Int = 0, + val eventPoLong: Int = 0 ) : Chu3UserEntity() diff --git a/src/main/resources/db/migration/mariadb/V1000_27__chusan_net_battle_log.sql b/src/main/resources/db/migration/mariadb/V1000_27__chusan_net_battle_log.sql new file mode 100644 index 00000000..636c8af5 --- /dev/null +++ b/src/main/resources/db/migration/mariadb/V1000_27__chusan_net_battle_log.sql @@ -0,0 +1,49 @@ +CREATE TABLE chusan_net_battle_log +( + id BIGINT AUTO_INCREMENT NOT NULL, + user_id BIGINT NULL, + room_id BIGINT NOT NULL, + track BIGINT NOT NULL, + select_user_id BIGINT NOT NULL, + select_user_name VARCHAR(255) NULL, + opponent_user_id1 BIGINT NOT NULL, + opponent_user_id2 BIGINT NOT NULL, + opponent_user_id3 BIGINT NOT NULL, + opponent_user_name1 VARCHAR(255) NULL, + opponent_user_name2 VARCHAR(255) NULL, + opponent_user_name3 VARCHAR(255) NULL, + opponent_region_id1 INT NOT NULL, + opponent_region_id2 INT NOT NULL, + opponent_region_id3 INT NOT NULL, + opponent_rating1 INT NOT NULL, + opponent_rating2 INT NOT NULL, + opponent_rating3 INT NOT NULL, + opponent_battle_rank_id1 INT NOT NULL, + opponent_battle_rank_id2 INT NOT NULL, + opponent_battle_rank_id3 INT NOT NULL, + opponent_class_emblem_medal1 INT NOT NULL, + opponent_class_emblem_medal2 INT NOT NULL, + opponent_class_emblem_medal3 INT NOT NULL, + opponent_class_emblem_base1 INT NOT NULL, + opponent_class_emblem_base2 INT NOT NULL, + opponent_class_emblem_base3 INT NOT NULL, + opponent_score1 INT NOT NULL, + opponent_score2 INT NOT NULL, + opponent_score3 INT NOT NULL, + opponent_chara_illust_id1 INT NOT NULL, + opponent_chara_illust_id2 INT NOT NULL, + opponent_chara_illust_id3 INT NOT NULL, + opponent_chara_lv1 INT NOT NULL, + opponent_chara_lv2 INT NOT NULL, + opponent_chara_lv3 INT NOT NULL, + opponent_rating_effect_color_id1 INT NOT NULL, + opponent_rating_effect_color_id2 INT NOT NULL, + opponent_rating_effect_color_id3 INT NOT NULL, + battle_rule_id INT NOT NULL, + month_po_long INT NOT NULL, + event_po_long INT NOT NULL, + CONSTRAINT pk_chusan_net_battle_log PRIMARY KEY (id) +); + +ALTER TABLE chusan_net_battle_log + ADD CONSTRAINT FK_CHUSAN_NET_BATTLE_LOG_ON_USER FOREIGN KEY (user_id) REFERENCES chusan_user_data (id); \ No newline at end of file