Implement more endpoints & overhaul [2/n]

Drop LevelDB and move all the things to SQLite.

Implemented endpoints:
/api <unit, accessoryMaterialAll>
/api <unit, accessoryTab>
/live/continue
/live/partyList
/unit/favoriteAccessory (WIP)
/unit/sale

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-04-28 11:44:56 +08:00
parent 1500821f3e
commit 150ce674ad
218 changed files with 2993 additions and 2160 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
package album
package albumapischema
type UnitList struct {
UnitID int `json:"unit_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package api
package apischema
type ApiReq struct {
Module string `json:"module"`
+1 -1
View File
@@ -1,4 +1,4 @@
package award
package awardapischema
type Info struct {
AwardID int `json:"award_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package background
package backgroundapischema
type Info struct {
BackgroundID int `json:"background_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package banner
package bannerapischema
type BannerList struct {
BannerType int `json:"banner_type"`
+1 -1
View File
@@ -1,4 +1,4 @@
package challenge
package challengeapischema
type InfoResp struct {
Result []any `json:"result"`
+1 -1
View File
@@ -1,4 +1,4 @@
package costume
package costumeapischema
type CostumeList struct {
UnitID int `json:"unit_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package eventscenario
package eventscenarioapischema
type ChapterList struct {
EventScenarioID int `json:"event_scenario_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package exchange
package exchangeapischema
type ExchangePointList struct {
Rarity int `json:"rarity"`
+1 -1
View File
@@ -1,4 +1,4 @@
package live
package liveapischema
type LiveList struct {
LiveDifficultyID int `json:"live_difficulty_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package live
package liveapischema
type NormalLiveStatusList struct {
LiveDifficultyID int `json:"live_difficulty_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package liveicon
package liveiconapischema
type InfoData struct {
LiveNotesIconList []int `json:"live_notes_icon_list"`
+1 -1
View File
@@ -1,4 +1,4 @@
package livese
package liveseapischema
type InfoData struct {
LiveSeList []int `json:"live_se_list"`
+1 -1
View File
@@ -1,4 +1,4 @@
package login
package loginapischema
type LicenseInfo struct {
LicenseList []any `json:"license_list"`
+1 -1
View File
@@ -1,4 +1,4 @@
package login
package loginapischema
type Notification struct {
Push bool `json:"push"`
+1 -1
View File
@@ -1,4 +1,4 @@
package marathon
package marathonapischema
type InfoResp struct {
Result []any `json:"result"`
@@ -1,4 +1,4 @@
package multiunit
package multiunitapischema
type ChapterList struct {
MultiUnitScenarioID int `json:"multi_unit_scenario_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package museum
package museumapischema
type Parameter struct {
Smile int `json:"smile"`
@@ -1,4 +1,4 @@
package navigation
package navigationapischema
type SpecialCutinData struct {
SpecialCutinList []any `json:"special_cutin_list"`
+1 -1
View File
@@ -1,4 +1,4 @@
package notice
package noticeapischema
type MarqueeData struct {
ItemCount int `json:"item_count"`
+2 -2
View File
@@ -1,4 +1,4 @@
package payment
package paymentapischema
type RestrictionInfo struct {
Restricted bool `json:"restricted"`
@@ -84,7 +84,7 @@ type UserStatus struct {
type SubscriptionStatus struct {
LicenseID int `json:"license_id"`
LicenseType int `json:"license_type"`
LicenseInfo LicenseInfo `json:"license_info,omitempty"`
LicenseInfo LicenseInfo `json:"license_info"`
UserStatus UserStatus `json:"user_status"`
PurchaseCount int `json:"purchase_count"`
BadgeFlag bool `json:"badge_flag"`
+9 -2
View File
@@ -1,7 +1,14 @@
package profile
package profileapischema
type CardRankingData struct {
UnitID int `json:"unit_id"`
TotalLove int `json:"total_love"`
Rank int `json:"rank"`
SignFlag bool `json:"sign_flag"`
}
type CardRankingResp struct {
Result []any `json:"result"`
Result any `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
+1 -1
View File
@@ -1,4 +1,4 @@
package profile
package profileapischema
type UnitData struct {
UnitOwningUserID int `xorm:"unit_owning_user_id pk autoincr" json:"unit_owning_user_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package profile
package profileapischema
type LiveCntData struct {
Difficulty int `json:"difficulty"`
+1 -1
View File
@@ -1,4 +1,4 @@
package scenario
package scenarioapischema
type StatusList struct {
ScenarioID int `json:"scenario_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package subscenario
package subscenarioapischema
type StatusList struct {
SubscenarioID int `json:"subscenario_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package unit
package unitapischema
type AccessoryList struct {
AccessoryOwningUserID int `json:"accessory_owning_user_id" xorm:"accessory_owning_user_id"`
@@ -0,0 +1,17 @@
package unitapischema
type AccessoryMaterialList struct {
AccessoryID int `json:"accessory_id"`
Amount int `json:"amount"`
}
type AccessoryMaterialAllData struct {
AccessoryMaterialList []AccessoryMaterialList `json:"accessory_material_list"`
}
type AccessoryMaterialAllResp struct {
Result AccessoryMaterialAllData `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
}
+22
View File
@@ -0,0 +1,22 @@
package unitapischema
type AssetList struct {
UnitTypeID int `json:"unit_type_id"`
AssetPath string `json:"asset_path"`
}
type TabList struct {
TabName string `json:"tab_name"`
AssetList []AssetList `json:"asset_list"`
}
type AccessoryTabData struct {
TabList []TabList `json:"tab_list"`
}
type AccessoryTabResp struct {
Result AccessoryTabData `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
}
+1 -1
View File
@@ -1,4 +1,4 @@
package unit
package unitapischema
type Costume struct {
UnitID int `json:"unit_id"`
+2 -2
View File
@@ -1,4 +1,4 @@
package unit
package unitapischema
type UserDeckData struct {
ID int `xorm:"id pk autoincr"`
@@ -26,7 +26,7 @@ type UnitDeckData struct {
IsSigned bool `xorm:"is_signed" json:"is_signed"`
BeforeLove int `xorm:"before_love" json:"before_love"`
MaxLove int `xorm:"max_love" json:"max_love"`
InsertData int64 `xorm:"insert_date" json:"-"`
InsertDate int64 `xorm:"insert_date" json:"-"`
}
type UnitOwningUserIds struct {
@@ -1,4 +1,4 @@
package unit
package unitapischema
type SkillEquipCount struct {
UnitRemovableSkillId int `xorm:"unit_removable_skill_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package unit
package unitapischema
type SupporterList struct {
UnitID int `json:"unit_id"`
+1 -1
View File
@@ -1,4 +1,4 @@
package user
package userapischema
type User struct {
UserID int `json:"user_id"`
+6 -40
View File
@@ -1,44 +1,10 @@
package user
package userapischema
type LpRecoveryItem struct {
ItemID int `json:"item_id"`
Amount int `json:"amount"`
}
type UserInfo struct {
UserID int `json:"user_id"`
Name string `json:"name"`
Level int `json:"level"`
Exp int `json:"exp"`
PreviousExp int `json:"previous_exp"`
NextExp int `json:"next_exp"`
GameCoin int `json:"game_coin"`
SnsCoin int `json:"sns_coin"`
FreeSnsCoin int `json:"free_sns_coin"`
PaidSnsCoin int `json:"paid_sns_coin"`
SocialPoint int `json:"social_point"`
UnitMax int `json:"unit_max"`
WaitingUnitMax int `json:"waiting_unit_max"`
EnergyMax int `json:"energy_max"`
EnergyFullTime string `json:"energy_full_time"`
LicenseLiveEnergyRecoverlyTime int `json:"license_live_energy_recoverly_time"`
EnergyFullNeedTime int `json:"energy_full_need_time"`
OverMaxEnergy int `json:"over_max_energy"`
TrainingEnergy int `json:"training_energy"`
TrainingEnergyMax int `json:"training_energy_max"`
FriendMax int `json:"friend_max"`
InviteCode string `json:"invite_code"`
InsertDate string `json:"insert_date"`
UpdateDate string `json:"update_date"`
TutorialState int `json:"tutorial_state"`
DiamondCoin int `json:"diamond_coin"`
CrystalCoin int `json:"crystal_coin"`
LpRecoveryItem []LpRecoveryItem `json:"lp_recovery_item"`
}
import userschema "honoka-chan/internal/schema/user"
type InfoResp struct {
Result UserInfo `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
Result userschema.UserInfo `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
}