usecase

package
v0.0.0-...-743ac1a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 13, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOrderUseCase

type CreateOrderUseCase struct {
	OrderRepository entity.OrderRepositoryInterface
	OrderCreated    events.EventInterface
	EventDispatcher events.EventDispatcherInterface
}

func NewCreateOrderUseCase

func NewCreateOrderUseCase(
	OrderRepository entity.OrderRepositoryInterface,
	OrderCreated events.EventInterface,
	EventDispatcher events.EventDispatcherInterface,
) *CreateOrderUseCase

func (*CreateOrderUseCase) Execute

type ListOrderInputDTO

type ListOrderInputDTO struct {
	Page  int    `json:"page"`
	Limit int    `json:"limit"`
	Sort  string `json:"sort"`
}

type ListOrderOutputDTO

type ListOrderOutputDTO struct {
	Orders *[]entity.Order `json:"orders"`
}

type ListOrdersUseCase

type ListOrdersUseCase struct {
	OrderRepository entity.OrderRepositoryInterface
}

func NewListOrdersUseCase

func NewListOrdersUseCase(OrderRepository entity.OrderRepositoryInterface) *ListOrdersUseCase

func (*ListOrdersUseCase) Execute

type OrderInputDTO

type OrderInputDTO struct {
	ProductName string  `json:"product_name"`
	Price       float64 `json:"price"`
	Tax         float64 `json:"tax"`
}

type OrderOutputDTO

type OrderOutputDTO struct {
	ID          uuid.UUID `json:"id"`
	ProductName string    `json:"product_name"`
	Price       float64   `json:"price"`
	Tax         float64   `json:"tax"`
	FinalPrice  float64   `json:"final_price"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL