domain

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 2 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          bson.ObjectId    `json:"id" bson:"_id,omitempty"`
	UserID      bson.ObjectId    `json:"userID" bson:"user_id,omitempty"`
	Details     string           `json:"details" bson:"details,omitempty"`
	Description string           `json:"description" bson:"description,omitempty"`
	Type        string           `json:"type" bson:"type,omitempty"`
	TotalPrice  float64          `json:"totalPrice" bson:"total_price,omitempty"`
	Products    []OrderedProduct `json:"products" bson:"products,omitempty"`
	CreatedOn   time.Time        `json:"createdOn" bson:"created_on,omitempty"`
}

Order ...

func NewOrder

func NewOrder(userID, details, description, typ string, totalPrice float64, products []OrderedProduct) *Order

NewOrder creates a new Order!

type OrderedProduct

type OrderedProduct struct {
	ID          bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Name        string        `json:"name" bson:"name,omitempty"`
	Description string        `json:"description" bson:"description,omitempty"`
	Price       float64       `json:"price" bson:"price,omitempty"`
	Quantity    uint32        `json:"quantity" bson:"quantity,omitempty"`
}

OrderedProduct ...

Jump to

Keyboard shortcuts

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