feat: implement new structure
This commit is contained in:
31
backend/app/services/order.go
Normal file
31
backend/app/services/order.go
Normal file
@@ -0,0 +1,31 @@
|
||||
package services
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
transaction_dto "quyun/v2/app/http/v1/dto"
|
||||
user_dto "quyun/v2/app/http/v1/dto"
|
||||
)
|
||||
|
||||
// @provider
|
||||
type order struct{}
|
||||
|
||||
func (s *order) ListUserOrders(ctx context.Context, status string) ([]user_dto.Order, error) {
|
||||
return []user_dto.Order{}, nil
|
||||
}
|
||||
|
||||
func (s *order) GetUserOrder(ctx context.Context, id string) (*user_dto.Order, error) {
|
||||
return &user_dto.Order{}, nil
|
||||
}
|
||||
|
||||
func (s *order) Create(ctx context.Context, form *transaction_dto.OrderCreateForm) (*transaction_dto.OrderCreateResponse, error) {
|
||||
return &transaction_dto.OrderCreateResponse{}, nil
|
||||
}
|
||||
|
||||
func (s *order) Pay(ctx context.Context, id string, form *transaction_dto.OrderPayForm) (*transaction_dto.OrderPayResponse, error) {
|
||||
return &transaction_dto.OrderPayResponse{}, nil
|
||||
}
|
||||
|
||||
func (s *order) Status(ctx context.Context, id string) (*transaction_dto.OrderStatusResponse, error) {
|
||||
return &transaction_dto.OrderStatusResponse{}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user