web 服务框架
This commit is contained in:
34
web/models/bill.gen.go
Normal file
34
web/models/bill.gen.go
Normal file
@@ -0,0 +1,34 @@
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
// Code generated by gorm.io/gen. DO NOT EDIT.
|
||||
|
||||
package models
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
const TableNameBill = "bill"
|
||||
|
||||
// Bill mapped from table <bill>
|
||||
type Bill struct {
|
||||
ID int32 `gorm:"column:id;primaryKey;autoIncrement:true;comment:账单ID" json:"id"` // 账单ID
|
||||
OrderID int32 `gorm:"column:order_id;not null;comment:订单ID" json:"order_id"` // 订单ID
|
||||
UserID int32 `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"` // 用户ID
|
||||
ProductID int32 `gorm:"column:product_id;comment:产品ID" json:"product_id"` // 产品ID
|
||||
Info string `gorm:"column:info;comment:产品可读信息" json:"info"` // 产品可读信息
|
||||
Count_ int32 `gorm:"column:count;comment:购买数量" json:"count"` // 购买数量
|
||||
Price float64 `gorm:"column:price;not null;comment:单价" json:"price"` // 单价
|
||||
Amount float64 `gorm:"column:amount;not null;comment:总金额" json:"amount"` // 总金额
|
||||
Payment float64 `gorm:"column:payment;not null;comment:支付金额" json:"payment"` // 支付金额
|
||||
CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP;comment:创建时间" json:"created_at"` // 创建时间
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP;comment:更新时间" json:"updated_at"` // 更新时间
|
||||
DeletedAt gorm.DeletedAt `gorm:"column:deleted_at;comment:删除时间" json:"deleted_at"` // 删除时间
|
||||
}
|
||||
|
||||
// TableName Bill's table name
|
||||
func (*Bill) TableName() string {
|
||||
return TableNameBill
|
||||
}
|
||||
Reference in New Issue
Block a user