服务之间相互调用
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
package dao
|
||||
|
||||
import "lone-services/pkg/utils"
|
||||
|
||||
type OrderProductCreate struct {
|
||||
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Ordersn string `gorm:"column:ordersn;type:varchar(100);comment:订单号;NOT NULL" json:"ordersn"`
|
||||
ProductId int `gorm:"column:product_id;type:int(11);comment:产品ID;NOT NULL" json:"product_id"`
|
||||
ProductName string `gorm:"column:product_name;type:varchar(255);comment:产品名;NOT NULL" json:"product_name"`
|
||||
Price float64 `gorm:"column:price;type:decimal(10,2);comment:产品单价格;NOT NULL" json:"price"`
|
||||
Number int `gorm:"column:number;type:int(11);default:0;comment:购买的数量;NOT NULL" json:"number"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态:1为正常,2为已推货" json:"status"`
|
||||
ReturnNumber int `gorm:"column:return_number;type:int(11);default:0;comment:退货数量" json:"return_number"`
|
||||
}
|
||||
|
||||
type OrderProductInfo struct {
|
||||
Id int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
Ordersn string `gorm:"column:ordersn;type:varchar(100);comment:订单号;NOT NULL" json:"ordersn"`
|
||||
ProductId int `gorm:"column:product_id;type:int(11);comment:产品ID;NOT NULL" json:"product_id"`
|
||||
ProductName string `gorm:"column:product_name;type:varchar(255);comment:产品名;NOT NULL" json:"product_name"`
|
||||
Price float64 `gorm:"column:price;type:decimal(10,2);comment:产品单价格;NOT NULL" json:"price"`
|
||||
Number int `gorm:"column:number;type:int(11);default:0;comment:购买的数量;NOT NULL" json:"number"`
|
||||
Status uint8 `gorm:"column:status;type:tinyint(1);default:1;comment:状态:1为正常,2为已推货" json:"status"`
|
||||
ReturnNumber int `gorm:"column:return_number;type:int(11);default:0;comment:退货数量" json:"return_number"`
|
||||
CreateType uint8 `gorm:"column:create_type;type:tinyint(1);default:1;comment:下单人类型,1为销售,2为门店,3为个人;NOT NULL" json:"create_type"`
|
||||
CreateTime utils.CustomTime `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP;comment:订单创建时间" json:"create_time"`
|
||||
}
|
||||
|
||||
type OrderProductPay struct {
|
||||
ProductId int `gorm:"column:product_id;type:int(11);comment:产品ID;NOT NULL" json:"product_id"`
|
||||
Number int `gorm:"column:number;type:int(11);default:0;comment:购买的数量;NOT NULL" json:"number"`
|
||||
ProductName string `gorm:"column:product_name;type:varchar(255);comment:产品名;NOT NULL" json:"product_name"`
|
||||
Type uint8 `gorm:"-" json:"type"`
|
||||
Price float64 `gorm:"column:price;type:decimal(10,2);comment:产品单价格;NOT NULL" json:"price"`
|
||||
}
|
||||
|
||||
type OrderProducts struct {
|
||||
Id int `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"`
|
||||
OrderSn string `gorm:"column:ordersn;type:varchar(100);comment:订单号;NOT NULL" json:"ordersn"`
|
||||
ProductId int `gorm:"column:product_id;type:int(11);comment:产品ID;NOT NULL" json:"product_id"`
|
||||
ProductName string `gorm:"column:product_name;type:varchar(255);comment:产品名;NOT NULL" json:"product_name"`
|
||||
Price float32 `gorm:"column:price;type:decimal(10,2);comment:产品单价格;NOT NULL" json:"price"`
|
||||
Number int `gorm:"column:number;type:int(11);default:0;comment:购买的数量;NOT NULL" json:"number"`
|
||||
}
|
||||
Reference in New Issue
Block a user