order

package
v0.0.0-...-cbaa3f3 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2017 License: MIT Imports: 3 Imported by: 0

README

add check out feature for ecommerce applications

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Order

type Order struct {
	Id         int64
	CustomerId int64
	StoreId    int64
	SellerId   int64
	Phone      string
	Address    string
	Price      float64

	DeliveryId int64

	Status int64

	Created int64
	Updated int64
	Deleted int64
	Version int64

	Products []OrderProduct `db:"-"`
}

func CreateOrder

func CreateOrder(db *gorp.DbMap, customer, storeid, deliveryid int64, phone,
	address string, products []OrderProduct, price float64) (Order, error)

func GetOrders

func GetOrders(db *gorp.DbMap, userid, storeid int64) ([]Order, error)

type OrderDelivery

type OrderDelivery struct {
	Id    int64
	Title string

	Price float64

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

func CreateDelivery

func CreateDelivery(db *gorp.DbMap, title string, price float64) (OrderDelivery,
	error)

func GetDelivery

func GetDelivery(db *gorp.DbMap, deliveryid int64) (OrderDelivery, error)

type OrderProduct

type OrderProduct struct {
	OrderId   int64
	ProductId int64
	Price     float64
	Count     int64

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

func GetOrderProducts

func GetOrderProducts(db *gorp.DbMap, orderid int64) ([]OrderProduct, error)

type OrderStatus

type OrderStatus struct {
	Id    int64
	Title string

	Created int64
	Updated int64
	Deleted int64
	Version int64
}

Jump to

Keyboard shortcuts

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