objects

package
v1.4.1 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by 'freedom new-crud'

Code generated by 'freedom new-crud'

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 added in v1.3.9

func (obj *Goods) AddPrice(price int)

AddPrice .

func (*Goods) AddStock added in v1.3.9

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 added in v1.3.9

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 added in v1.3.9

func (obj *Order) AddGoodsID(goodsID int)

AddGoodsID .

func (*Order) AddNum added in v1.3.9

func (obj *Order) AddNum(num int)

AddNum .

func (*Order) AddUserID added in v1.3.9

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 added in v1.3.9

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