feat: 添加订单详情和退款功能,更新用户角色管理,增强超级管理员鉴权
This commit is contained in:
10
backend/app/http/super/dto/order_detail.go
Normal file
10
backend/app/http/super/dto/order_detail.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package dto
|
||||
|
||||
import "quyun/v2/database/models"
|
||||
|
||||
type SuperOrderDetail struct {
|
||||
Order *models.Order `json:"order,omitempty"`
|
||||
|
||||
Tenant *OrderTenantLite `json:"tenant,omitempty"`
|
||||
Buyer *OrderBuyerLite `json:"buyer,omitempty"`
|
||||
}
|
||||
10
backend/app/http/super/dto/order_refund.go
Normal file
10
backend/app/http/super/dto/order_refund.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package dto
|
||||
|
||||
type SuperOrderRefundForm struct {
|
||||
// Force indicates bypassing the default refund window check (paid_at + 24h).
|
||||
Force bool `json:"force,omitempty"`
|
||||
// Reason is the human-readable refund reason used for audit.
|
||||
Reason string `json:"reason,omitempty"`
|
||||
// IdempotencyKey ensures refund request is processed at most once.
|
||||
IdempotencyKey string `json:"idempotency_key,omitempty"`
|
||||
}
|
||||
7
backend/app/http/super/dto/user_roles.go
Normal file
7
backend/app/http/super/dto/user_roles.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package dto
|
||||
|
||||
import "quyun/v2/pkg/consts"
|
||||
|
||||
type UserRolesUpdateForm struct {
|
||||
Roles []consts.Role `json:"roles" validate:"required,min=1,dive,oneof=user super_admin"`
|
||||
}
|
||||
Reference in New Issue
Block a user