95 lines
3.9 KiB
Go
95 lines
3.9 KiB
Go
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"`
|
||
PointsAvailable int64 `json:"points_available"`
|
||
RenterGrowthLevel string `json:"renter_growth_level"`
|
||
RenterGrowthLevelName string `json:"renter_growth_level_name"`
|
||
RenterGrowthLevelOverride string `json:"renter_growth_level_override"`
|
||
RenterGrowthLevelManual bool `json:"renter_growth_level_manual"`
|
||
AvailableBalanceCent int64 `json:"available_balance_cent"`
|
||
FrozenBalanceCent int64 `json:"frozen_balance_cent"`
|
||
QualityOwnerStatus string `json:"quality_owner_status"`
|
||
QualityOwnerDepositCent int64 `json:"quality_owner_deposit_cent"`
|
||
QualityOwnerDepositSource string `json:"quality_owner_deposit_source"`
|
||
QualityOwnerActivatedAt *time.Time `json:"quality_owner_activated_at"`
|
||
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"`
|
||
}
|
||
|
||
type GrowthLevelAdjustRequest struct {
|
||
TargetLevel string `json:"target_level"`
|
||
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
|
||
QualityOwnerOnly bool
|
||
// DepositFreeQuota: has=有免押额度, none=无免押额度, 空=全部。
|
||
DepositFreeQuota string
|
||
// OwnerType: quality=优质号主, normal=普通用户, 空=全部。
|
||
OwnerType string
|
||
// GrowthLevel: 成长等级 code(normal/platinum/diamond/peak),空=全部。
|
||
GrowthLevel string
|
||
}
|
||
|
||
type PaginatedResult struct {
|
||
Items interface{} `json:"items"`
|
||
Total int64 `json:"total"`
|
||
Page int `json:"page"`
|
||
PageSize int `json:"page_size"`
|
||
}
|