Documentation ¶
Overview ¶
Code generated by 'freedom new-po'
Code generated by 'freedom new-po'
Code generated by 'freedom new-project infra-example'
Index ¶
- type Goods
- func (obj *Goods) AddPrice(price int)
- func (obj *Goods) AddStock(stock int)
- 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) TableName() string
- func (obj *Goods) TakeChanges() map[string]interface{}
- type Order
- func (obj *Order) AddGoodsId(goodsId int)
- func (obj *Order) AddNum(num int)
- func (obj *Order) AddUserId(userId int)
- 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) TakeChanges() map[string]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:"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 }
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 }
Click to show internal directories.
Click to hide internal directories.