1
This commit is contained in:
parent
281f6da355
commit
7d90f7dc40
38
server/wheelserver/model/inapp_order.go
Normal file
38
server/wheelserver/model/inapp_order.go
Normal file
@ -0,0 +1,38 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"f5"
|
||||
//"errors"
|
||||
"main/constant"
|
||||
//"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type InAppOrder struct {
|
||||
Idx int64 `gorm:"column:idx;AUTO_INCREMENT;primaryKey"`
|
||||
OrderId string `gorm:"column:order_id"`
|
||||
SpOrderId string `gorm:"column:sp_order_id"`
|
||||
AccountId string `gorm:"column:account_id;<-:create"`
|
||||
GoodsId int32 `gorm:"column:goods_id;<-:create"`
|
||||
Status int32 `gorm:"column:status"`
|
||||
CreateTime int32 `gorm:"column:createtime;<-:create"`
|
||||
ModifyTime int32 `gorm:"column:modifytime"`
|
||||
}
|
||||
|
||||
func (this *InAppOrder) TableName() string {
|
||||
return "t_inapp_order"
|
||||
}
|
||||
|
||||
func (this *InAppOrder) Create() error {
|
||||
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Create(this); result.Error != nil {
|
||||
return result.Error
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (this *InAppOrder) UpdateFields(fields []string) error {
|
||||
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Model(this).Select(
|
||||
fields).Updates(this); result.Error != nil {
|
||||
return result.Error
|
||||
}
|
||||
return nil
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user