互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
966 B

package models
import (
"time"
)
const CustomerGoodsTableName = TableNamePrefix + "customer_goods"
type CustomerGoods struct {
Id int64 `json:"id"`
ActivityId int64 `json:"activity_id"`
GoodsPicUrl string `json:"goods_pic_url"`
Name string `json:"name" description:"商品名字"`
Qrcode string `json:"qrcode" xorm:"-"`
Price float64 `json:"price" description:"价格"`
Desc string `json:"desc" description:"介绍"`
IsDelete bool `json:"is_delete" xorm:"default(0)"`
CreatedAt time.Time `json:"created_at" xorm:"created"`
UpdatedAt time.Time `json:"updated_at" xorm:"updated"`
}
func (t *CustomerGoods) TableName() string {
return CustomerGoodsTableName
}
func (t *CustomerGoods) Alias(name string) string {
return AliasTableName(t, name)
}
//func (t *CustomerGoods) GetById(gid int64) (bool, error) {
// return core.GetXormAuto().Where("is_delete=0 and id=?", gid).Get(t)
//}