Documentation
¶
Index ¶
- type Goods
- func (obj *Goods) Save() map[string]interface{}
- func (obj *Goods) SetCreated(created time.Time)
- func (obj *Goods) SetID(iD int)
- 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) TableName() string
- type GoodsRep
- type Order
- func (obj *Order) Save() map[string]interface{}
- func (obj *Order) SetCreated(created time.Time)
- func (obj *Order) SetGoodsID(goodsID int)
- func (obj *Order) SetID(iD 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
- type OrderRep
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
}
Goods .
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
}
Order .
Click to show internal directories.
Click to hide internal directories.