Documentation ¶
Overview ¶
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Code generated by 'freedom new-crud'
Index ¶
- type Admin
- type Cart
- func (obj *Cart) AddGoodsId(goodsId int)
- func (obj *Cart) AddNum(num int)
- func (obj *Cart) AddUserId(userId int)
- func (obj *Cart) SetCreated(created time.Time)
- func (obj *Cart) SetGoodsId(goodsId int)
- func (obj *Cart) SetNum(num int)
- func (obj *Cart) SetUpdated(updated time.Time)
- func (obj *Cart) SetUserId(userId int)
- func (obj *Cart) TableName() string
- func (obj *Cart) TakeChanges() map[string]interface{}
- type Delivery
- func (obj *Delivery) AddAdminId(adminId int)
- func (obj *Delivery) SetAdminId(adminId int)
- func (obj *Delivery) SetCreated(created time.Time)
- func (obj *Delivery) SetOrderNo(orderNo string)
- func (obj *Delivery) SetTrackingNumber(trackingNumber string)
- func (obj *Delivery) SetUpdated(updated time.Time)
- func (obj *Delivery) TableName() string
- func (obj *Delivery) TakeChanges() map[string]interface{}
- 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) SetTag(tag string)
- func (obj *Goods) SetUpdated(updated time.Time)
- func (obj *Goods) TableName() string
- func (obj *Goods) TakeChanges() map[string]interface{}
- type Order
- func (obj *Order) AddTotalPrice(totalPrice int)
- func (obj *Order) AddUserId(userId int)
- func (obj *Order) SetCreated(created time.Time)
- func (obj *Order) SetOrderNo(orderNo string)
- func (obj *Order) SetStatus(status string)
- func (obj *Order) SetTotalPrice(totalPrice 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{}
- type OrderDetail
- func (obj *OrderDetail) AddGoodsId(goodsId int)
- func (obj *OrderDetail) AddNum(num int)
- func (obj *OrderDetail) SetCreated(created time.Time)
- func (obj *OrderDetail) SetGoodsId(goodsId int)
- func (obj *OrderDetail) SetGoodsName(goodsName string)
- func (obj *OrderDetail) SetNum(num int)
- func (obj *OrderDetail) SetOrderNo(orderNo string)
- func (obj *OrderDetail) SetUpdated(updated time.Time)
- func (obj *OrderDetail) TableName() string
- func (obj *OrderDetail) TakeChanges() map[string]interface{}
- type User
- func (obj *User) AddMoney(money int)
- func (obj *User) SetCreated(created time.Time)
- func (obj *User) SetMoney(money int)
- func (obj *User) SetName(name string)
- func (obj *User) SetPassword(password string)
- func (obj *User) SetUpdated(updated time.Time)
- func (obj *User) TableName() string
- func (obj *User) TakeChanges() map[string]interface{}
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Admin ¶
type Cart ¶
type Cart 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 }
type Delivery ¶
type Delivery struct { Id int `gorm:"primary_key" column:"id"` AdminId int `gorm:"column:admin_id"` // 管理员id OrderNo string `gorm:"column:order_no"` TrackingNumber string `gorm:"column:tracking_number"` // 快递单号 Created time.Time `gorm:"column:created"` Updated time.Time `gorm:"column:updated"` // contains filtered or unexported fields }
func (*Delivery) SetOrderNo ¶ added in v1.6.5
SetOrderNo .
func (*Delivery) SetTrackingNumber ¶
SetTrackingNumber .
func (*Delivery) TakeChanges ¶
TakeChanges .
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"` // 库存 Tag string `gorm:"column:tag"` // 标签 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"` OrderNo string `gorm:"column:order_no"` UserId int `gorm:"column:user_id"` // 用户id TotalPrice int `gorm:"column:total_price"` // 总价 Status string `gorm:"column:status"` // 支付,未支付,发货,完成 Created time.Time `gorm:"column:created"` Updated time.Time `gorm:"column:updated"` // contains filtered or unexported fields }
type OrderDetail ¶
type OrderDetail struct { Id int `gorm:"primary_key" column:"id"` OrderNo string `gorm:"column:order_no"` // 订单id GoodsId int `gorm:"column:goods_id"` // 商品id Num int `gorm:"column:num"` // 数量 GoodsName string `gorm:"column:goods_name"` // 商品名称 Created time.Time `gorm:"column:created"` Updated time.Time `gorm:"column:updated"` // contains filtered or unexported fields }
func (*OrderDetail) SetGoodsName ¶
func (obj *OrderDetail) SetGoodsName(goodsName string)
SetGoodsName .
func (*OrderDetail) TableName ¶
func (obj *OrderDetail) TableName() string
func (*OrderDetail) TakeChanges ¶
func (obj *OrderDetail) TakeChanges() map[string]interface{}
TakeChanges .
type User ¶
type User struct { Id int `gorm:"primary_key" column:"id"` // 用户id Name string `gorm:"column:name"` // 用户名称 Money int `gorm:"column:money"` // 金钱 Password string `gorm:"column:password"` // 密码 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.