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:
@@ -1,4 +1,4 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type UnitDeckDetail struct {
|
||||
Position int `json:"position"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type DeckNameReq struct {
|
||||
Module string `json:"module"`
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type FavoriteReq struct {
|
||||
Module string `json:"module"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int64 `json:"timeStamp"`
|
||||
Mgd int `json:"mgd"`
|
||||
FavoriteFlag int `json:"favorite_flag"`
|
||||
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
|
||||
type FavoriteResp struct {
|
||||
ResponseData []any `json:"response_data"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type SkillRemove struct {
|
||||
UnitRemovableSkillID int `json:"unit_removable_skill_id"`
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package unitschema
|
||||
|
||||
import userschema "honoka-chan/internal/schema/user"
|
||||
|
||||
type SaleReq struct {
|
||||
Module string `json:"module"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int `json:"timeStamp"`
|
||||
Mgd int `json:"mgd"`
|
||||
UnitSupportList []any `json:"unit_support_list"`
|
||||
UnitOwningUserID []int `json:"unit_owning_user_id"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
|
||||
type Detail struct {
|
||||
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||
UnitID int `json:"unit_id"`
|
||||
IsSigned bool `json:"is_signed"`
|
||||
Price int `json:"price"`
|
||||
}
|
||||
|
||||
type OwningInfo struct {
|
||||
UnitRemovableSkillID int `json:"unit_removable_skill_id"`
|
||||
TotalAmount int `json:"total_amount"`
|
||||
EquippedAmount int `json:"equipped_amount"`
|
||||
InsertDate string `json:"insert_date"`
|
||||
}
|
||||
|
||||
type UnitRemovableSkill struct {
|
||||
OwningInfo []OwningInfo `json:"owning_info"`
|
||||
}
|
||||
|
||||
type SaleData struct {
|
||||
Total int `json:"total"`
|
||||
Detail []Detail `json:"detail"`
|
||||
BeforeUserInfo userschema.UserInfo `json:"before_user_info"`
|
||||
AfterUserInfo userschema.UserInfo `json:"after_user_info"`
|
||||
RewardBoxFlag bool `json:"reward_box_flag"`
|
||||
GetExchangePointList []any `json:"get_exchange_point_list"`
|
||||
UnitRemovableSkill UnitRemovableSkill `json:"unit_removable_skill"`
|
||||
ServerTimestamp int64 `json:"server_timestamp"`
|
||||
}
|
||||
|
||||
type SaleResp struct {
|
||||
ResponseData SaleData `json:"response_data"`
|
||||
ReleaseInfo []any `json:"release_info"`
|
||||
StatusCode int `json:"status_code"`
|
||||
}
|
||||
@@ -1,4 +1,14 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type SetDisplayRankReq struct {
|
||||
Module string `json:"module"`
|
||||
Action string `json:"action"`
|
||||
TimeStamp int64 `json:"timeStamp"`
|
||||
Mgd int `json:"mgd"`
|
||||
UnitOwningUserID int `json:"unit_owning_user_id"`
|
||||
DisplayRank int `json:"display_rank"`
|
||||
CommandNum string `json:"commandNum"`
|
||||
}
|
||||
|
||||
type SetDisplayRankResp struct {
|
||||
ResponseData []any `json:"response_data"`
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package unit
|
||||
package unitschema
|
||||
|
||||
type AccessoryRemove struct {
|
||||
AccessoryOwningUserID int `json:"accessory_owning_user_id"`
|
||||
|
||||
Reference in New Issue
Block a user