Code cleanup

Signed-off-by: Yuan Si <do4suki@gmail.com>
This commit is contained in:
2023-04-24 17:50:39 +08:00
parent e1e0e8c27d
commit 327b4a222b
56 changed files with 907 additions and 1610 deletions
+21 -6
View File
@@ -1,10 +1,11 @@
package model
// module: payment, action: productList
// RestrictionInfo ...
type RestrictionInfo struct {
Restricted bool `json:"restricted"`
}
// UnderAgeInfo ...
type UnderAgeInfo struct {
BirthSet bool `json:"birth_set"`
HasLimit bool `json:"has_limit"`
@@ -12,6 +13,7 @@ type UnderAgeInfo struct {
MonthUsed int `json:"month_used"`
}
// SnsProductItemList ...
type SnsProductItemList struct {
ItemID int `json:"item_id"`
AddType int `json:"add_type"`
@@ -19,6 +21,7 @@ type SnsProductItemList struct {
IsFreebie bool `json:"is_freebie"`
}
// SnsProductList ...
type SnsProductList struct {
ProductID string `json:"product_id"`
Name string `json:"name"`
@@ -28,6 +31,7 @@ type SnsProductList struct {
ItemList []SnsProductItemList `json:"item_list"`
}
// ProductItemList ...
type ProductItemList struct {
ItemID int `json:"item_id"`
AddType int `json:"add_type"`
@@ -36,12 +40,14 @@ type ProductItemList struct {
IsRankMax bool `json:"is_rank_max,omitempty"`
}
// LimitStatus ...
type LimitStatus struct {
TermStartDate string `json:"term_start_date"`
RemainingTime string `json:"remaining_time"`
RemainingCount int `json:"remaining_count"`
}
// ProductList ...
type ProductList struct {
ProductID string `json:"product_id"`
Name string `json:"name"`
@@ -55,6 +61,7 @@ type ProductList struct {
LimitStatus LimitStatus `json:"limit_status"`
}
// SubscriptionItemList ...
type SubscriptionItemList struct {
ItemID int `json:"item_id"`
AddType int `json:"add_type"`
@@ -62,26 +69,31 @@ type SubscriptionItemList struct {
IsFreebie bool `json:"is_freebie"`
}
// RewardList ...
type RewardList struct {
ItemID int `json:"item_id"`
AddType int `json:"add_type"`
Amount int `json:"amount"`
}
// Items ...
type Items struct {
Seq int `json:"seq"`
RewardList []RewardList `json:"reward_list"`
}
// LicenseInfo ...
type LicenseInfo struct {
Name string `json:"name"`
Items []Items `json:"items"`
}
// UserStatus ...
type UserStatus struct {
IsLicensed bool `json:"is_licensed"`
}
// SubscriptionStatus ...
type SubscriptionStatus struct {
LicenseID int `json:"license_id"`
LicenseType int `json:"license_type"`
@@ -91,6 +103,7 @@ type SubscriptionStatus struct {
BadgeFlag bool `json:"badge_flag"`
}
// SubscriptionList ...
type SubscriptionList struct {
ProductID string `json:"product_id"`
Name string `json:"name"`
@@ -104,7 +117,8 @@ type SubscriptionList struct {
SubscriptionStatus SubscriptionStatus `json:"subscription_status"`
}
type ProductListResult struct {
// ProductListRes ...
type ProductListRes struct {
RestrictionInfo RestrictionInfo `json:"restriction_info"`
UnderAgeInfo UnderAgeInfo `json:"under_age_info"`
SnsProductList []SnsProductList `json:"sns_product_list"`
@@ -113,9 +127,10 @@ type ProductListResult struct {
ShowPointShop bool `json:"show_point_shop"`
}
// ProductListResp ...
type ProductListResp struct {
Result ProductListResult `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
Result ProductListRes `json:"result"`
Status int `json:"status"`
CommandNum bool `json:"commandNum"`
TimeStamp int64 `json:"timeStamp"`
}