po

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package po generated by 'freedom new-po'

Package po generated by 'freedom new-po'

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:"primaryKey;column:id"`
	Name    string    `gorm:"column:name"`    // 商品名称
	Price   int       `gorm:"column:price"`   // 价格
	Stock   int       `gorm:"column:stock"`   // 库存
	Version int       `gorm:"column:version"` // 乐观锁版本号
	Created time.Time `gorm:"column:created"`
	Updated time.Time `gorm:"column:updated"`
	// contains filtered or unexported fields
}

Goods .

func (*Goods) AddPrice

func (obj *Goods) AddPrice(price int)

AddPrice .

func (*Goods) AddStock

func (obj *Goods) AddStock(stock int)

AddStock .

func (*Goods) AddVersion added in v1.8.9

func (obj *Goods) AddVersion(version int)

AddVersion .

func (*Goods) GetChanges added in v1.8.8

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

GetChanges .

func (*Goods) Location added in v1.8.8

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

Location .

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) SetVersion added in v1.8.9

func (obj *Goods) SetVersion(version int)

SetVersion .

func (*Goods) TableName

func (obj *Goods) TableName() string

TableName .

func (*Goods) Update added in v1.8.9

func (obj *Goods) Update(name string, value interface{})

Update .

type Order

type Order struct {
	ID      int       `gorm:"primaryKey;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
}

Order .

func (*Order) AddGoodsID added in v1.8.0

func (obj *Order) AddGoodsID(goodsID int)

AddGoodsID .

func (*Order) AddNum

func (obj *Order) AddNum(num int)

AddNum .

func (*Order) AddUserID added in v1.8.0

func (obj *Order) AddUserID(userID int)

AddUserID .

func (*Order) GetChanges added in v1.8.8

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

GetChanges .

func (*Order) Location added in v1.8.8

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

Location .

func (*Order) SetCreated

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

SetCreated .

func (*Order) SetGoodsID added in v1.8.0

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

func (obj *Order) SetUserID(userID int)

SetUserID .

func (*Order) TableName

func (obj *Order) TableName() string

TableName .

func (*Order) Update added in v1.8.9

func (obj *Order) Update(name string, value interface{})

Update .

Jump to

Keyboard shortcuts

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