orders

package
v0.0.0-...-436daa5 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	ID         primitive.ObjectID `bson:"_id,omitempty"`
	OrderLines []*OrderLine       `bson:"order_lines,omitempty"`
	TotalPrice int32              `bson:"total_price,omitempty"`
	OrderDate  string             `bson:"order_date,omitempty"`
}

func NewOrder

func NewOrder(orderLines []*OrderLine, totalPrice int32, orderDate string) *Order

type OrderLine

type OrderLine struct {
	BookId   string `bson:"book_id,omitempty"`
	Quantity int32  `bson:"quantity,omitempty"`
}

func NewOrderLine

func NewOrderLine(bookId string, quantity int32) *OrderLine

type OrdersService

type OrdersService struct {
	// contains filtered or unexported fields
}

func NewOrdersService

func NewOrdersService(client *mongo.Client) *OrdersService

func (*OrdersService) CreateOrder

func (*OrdersService) DeleteOrder

func (*OrdersService) GetOrder

func (*OrdersService) ListOrders

func (*OrdersService) UpdateOrder

Jump to

Keyboard shortcuts

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