Documentation ¶
Overview ¶
Package po generated by 'freedom new-po'
Package po generated by 'freedom new-po'
Index ¶
- type Goods
- func (obj *Goods) AddPrice(price int)
- func (obj *Goods) AddStock(stock int)
- func (obj *Goods) AddVersion(version int)
- func (obj *Goods) GetChanges() map[string]interface{}
- func (obj *Goods) Location() map[string]interface{}
- func (obj *Goods) SetCreated(created time.Time)
- func (obj *Goods) SetName(name string)
- func (obj *Goods) SetPrice(price int)
- func (obj *Goods) SetStock(stock int)
- func (obj *Goods) SetUpdated(updated time.Time)
- func (obj *Goods) SetVersion(version int)
- func (obj *Goods) TableName() string
- func (obj *Goods) Update(name string, value interface{})
- type Order
- func (obj *Order) AddGoodsID(goodsID int)
- func (obj *Order) AddNum(num int)
- func (obj *Order) AddUserID(userID int)
- func (obj *Order) GetChanges() map[string]interface{}
- func (obj *Order) Location() map[string]interface{}
- func (obj *Order) SetCreated(created time.Time)
- func (obj *Order) SetGoodsID(goodsID int)
- func (obj *Order) SetNum(num int)
- func (obj *Order) SetUpdated(updated time.Time)
- func (obj *Order) SetUserID(userID int)
- func (obj *Order) TableName() string
- func (obj *Order) Update(name string, value interface{})
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) GetChanges ¶ added in v1.8.8
GetChanges .
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) GetChanges ¶ added in v1.8.8
GetChanges .
Click to show internal directories.
Click to hide internal directories.