chore(init): 初始化解忧商行项目并完成 Phase 0 基座
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
package adminuser
|
||||
|
||||
import "time"
|
||||
|
||||
type UserDTO struct {
|
||||
ID uint64 `json:"id"`
|
||||
Phone string `json:"phone"`
|
||||
Nickname string `json:"nickname"`
|
||||
RealnameStatus string `json:"realname_status"`
|
||||
RiskStatus string `json:"risk_status"`
|
||||
CreditScore int `json:"credit_score"`
|
||||
DepositFreeQuotaCent int64 `json:"deposit_free_quota_cent"`
|
||||
DepositFreeManualQuotaCent int64 `json:"deposit_free_manual_quota_cent"`
|
||||
DepositFreeLevelQuotaCent int64 `json:"deposit_free_level_quota_cent"`
|
||||
DepositFreeEffectiveQuotaCent int64 `json:"deposit_free_effective_quota_cent"`
|
||||
DepositFreeUsedCent int64 `json:"deposit_free_used_cent"`
|
||||
DepositFreeRemainingCent int64 `json:"deposit_free_remaining_cent"`
|
||||
RenterGrowthPoints int64 `json:"renter_growth_points"`
|
||||
RenterGrowthLevel string `json:"renter_growth_level"`
|
||||
RenterGrowthLevelName string `json:"renter_growth_level_name"`
|
||||
AvailableBalanceCent int64 `json:"available_balance_cent"`
|
||||
FrozenBalanceCent int64 `json:"frozen_balance_cent"`
|
||||
Status string `json:"status"`
|
||||
OrderCount int64 `json:"order_count"`
|
||||
ListingCount int64 `json:"listing_count"`
|
||||
DisputeCount int64 `json:"dispute_count"`
|
||||
LastLoginAt *time.Time `json:"last_login_at"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
type FreezeRequest struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type RevokeRealnameRequest struct {
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type ManualRealnameRequest struct {
|
||||
Name string `json:"name"`
|
||||
IDNo string `json:"id_no"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
type DepositFreeQuotaRequest struct {
|
||||
AmountCent int64 `json:"amount_cent"`
|
||||
}
|
||||
|
||||
type GrowthPointsAdjustRequest struct {
|
||||
TargetPoints int64 `json:"target_points"`
|
||||
Reason string `json:"reason" binding:"required"`
|
||||
}
|
||||
|
||||
// WalletAdjustRequest 后台人工调整用户可用余额。
|
||||
// Direction: in=加款 out=扣款;仅操作 available,不改 frozen。
|
||||
type WalletAdjustRequest struct {
|
||||
Direction string `json:"direction" binding:"required"`
|
||||
AmountCent int64 `json:"amount_cent" binding:"required"`
|
||||
Reason string `json:"reason" binding:"required"`
|
||||
ReferenceNo string `json:"reference_no"`
|
||||
}
|
||||
|
||||
// ListQuery 用户列表筛选条件。Keyword 同时匹配手机号/昵称(模糊)与用户 ID(精确)。
|
||||
type ListQuery struct {
|
||||
Keyword string
|
||||
Status string
|
||||
HasDepositFreeQuota bool
|
||||
}
|
||||
|
||||
type PaginatedResult struct {
|
||||
Items interface{} `json:"items"`
|
||||
Total int64 `json:"total"`
|
||||
Page int `json:"page"`
|
||||
PageSize int `json:"page_size"`
|
||||
}
|
||||
Reference in New Issue
Block a user