po

package
v1.7.9 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Code generated by 'freedom new-po'

Code generated by 'freedom new-po'

Code generated by 'freedom new-project infra-example'

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Goods

type Goods struct {
	Id      int       `gorm:"primary_key;column:id"`
	Name    string    `gorm:"column:name"`  // 商品名称
	Price   int       `gorm:"column:price"` // 价格
	Stock   int       `gorm:"column:stock"` // 库存
	Created time.Time `gorm:"column:created"`
	Updated time.Time `gorm:"column:updated"`
	// contains filtered or unexported fields
}

func (*Goods) AddPrice

func (obj *Goods) AddPrice(price int)

AddPrice .

func (*Goods) AddStock

func (obj *Goods) AddStock(stock int)

AddStock .

func (*Goods) SetCreated

func (obj *Goods) SetCreated(created time.Time)

SetCreated .

func (*Goods) SetName

func (obj *Goods) SetName(name string)

SetName .

func (*Goods) SetPrice

func (obj *Goods) SetPrice(price int)

SetPrice .

func (*Goods) SetStock

func (obj *Goods) SetStock(stock int)

SetStock .

func (*Goods) SetUpdated

func (obj *Goods) SetUpdated(updated time.Time)

SetUpdated .

func (*Goods) TableName

func (obj *Goods) TableName() string

func (*Goods) TakeChanges

func (obj *Goods) TakeChanges() map[string]interface{}

TakeChanges .

type Order

type Order struct {
	Id      int       `gorm:"primary_key;column:id"`
	UserId  int       `gorm:"column:user_id"`  // 用户id
	GoodsId int       `gorm:"column:goods_id"` // 商品id
	Num     int       `gorm:"column:num"`      // 数量
	Created time.Time `gorm:"column:created"`
	Updated time.Time `gorm:"column:updated"`
	// contains filtered or unexported fields
}

func (*Order) AddGoodsId

func (obj *Order) AddGoodsId(goodsId int)

AddGoodsId .

func (*Order) AddNum

func (obj *Order) AddNum(num int)

AddNum .

func (*Order) AddUserId

func (obj *Order) AddUserId(userId int)

AddUserId .

func (*Order) SetCreated

func (obj *Order) SetCreated(created time.Time)

SetCreated .

func (*Order) SetGoodsId

func (obj *Order) SetGoodsId(goodsId int)

SetGoodsId .

func (*Order) SetNum

func (obj *Order) SetNum(num int)

SetNum .

func (*Order) SetUpdated

func (obj *Order) SetUpdated(updated time.Time)

SetUpdated .

func (*Order) SetUserId

func (obj *Order) SetUserId(userId int)

SetUserId .

func (*Order) TableName

func (obj *Order) TableName() string

func (*Order) TakeChanges

func (obj *Order) TakeChanges() map[string]interface{}

TakeChanges .

Jump to

Keyboard shortcuts

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