order

package
v0.0.0-...-eb64f0e Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AMonth = 30 * 24 * 60 * 60 * 1e9

Variables

View Source
var (
	Service *serviceProvider

	StatusUnpay     uint8 = 0
	StatusPaid      uint8 = 1
	StatusConfirmed uint8 = 2
	PayWayOnline    uint8 = 3
)

Functions

This section is empty.

Types

type CreateReq

type CreateReq struct {
	Orders     []OrderItem `json:"orders" validate:"required"`
	ReceiveWay uint8       `json:"receive_way" validate:"required"`
}

type Order

type Order struct {
	ID         uint64  `gorm:"primary_key;auto_increment"`
	BillID     string  `gorm:"not null"`
	UserID     uint32  `gorm:"not null"`
	ParentID   uint64  `gorm:"not null"`
	Status     uint8   `gorm:"not null";default:0`
	WareId     uint32  `gorm:"not null" json:"ware_id"`
	Count      uint8   `gorm:"not null";default:0 json:"count"`
	Price      float32 `gorm:"not null";default:0 json:"price"`
	ReceiveWay uint8   `gorm:"not null";default:0`
	CreatedAt  *time.Time
}

type OrderItem

type OrderItem struct {
	WareId uint32  `json:"ware_id" validate:"required"`
	Count  uint8   `json:"count" validate:"required"`
	Price  float32 `json:"price" validate:"required"`
}

Jump to

Keyboard shortcuts

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