This commit is contained in:
2026-04-25 11:59:10 +08:00
parent e246271a24
commit ba463ae38d
33 changed files with 1600 additions and 112 deletions

View File

@@ -0,0 +1,55 @@
package commands
// SubPortalRegisterCommand 子站注册(邀请码必填)
type SubPortalRegisterCommand struct {
Phone string `json:"phone" binding:"required"`
Password string `json:"password" binding:"required"`
ConfirmPassword string `json:"confirm_password" binding:"required"`
Code string `json:"code" binding:"required"`
InviteToken string `json:"invite_token" binding:"required"`
}
// CreateInvitationCommand 主账号创建邀请
type CreateInvitationCommand struct {
ParentUserID string
// ExpiresInHours 可选0 用默认 168 小时
ExpiresInHours int `json:"expires_in_hours"`
}
// AllocateToChildCommand 主账号向下属划余额
type AllocateToChildCommand struct {
ParentUserID string
ChildUserID string `json:"child_user_id" binding:"required"`
Amount string `json:"amount" binding:"required"`
VerifyCode string `json:"verify_code" binding:"required,len=6"`
}
// AssignChildSubscriptionCommand 为下属代配订阅
type AssignChildSubscriptionCommand struct {
ParentUserID string
ChildUserID string `json:"child_user_id" binding:"required"`
ProductID string `json:"product_id" binding:"required"`
Price string `json:"price" binding:"required"`
UIComponentPrice string `json:"ui_component_price"`
}
// ListChildAllocationsCommand 下属划拨记录查询
type ListChildAllocationsCommand struct {
ParentUserID string
ChildUserID string `json:"child_user_id" form:"child_user_id" binding:"required"`
Page int `json:"page" form:"page"`
PageSize int `json:"page_size" form:"page_size"`
}
// ListChildSubscriptionsCommand 下属订阅列表查询
type ListChildSubscriptionsCommand struct {
ParentUserID string
ChildUserID string `json:"child_user_id" form:"child_user_id" binding:"required"`
}
// RemoveChildSubscriptionCommand 删除下属订阅
type RemoveChildSubscriptionCommand struct {
ParentUserID string
ChildUserID string `json:"child_user_id" binding:"required"`
SubscriptionID string `json:"subscription_id" binding:"required"`
}