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
1.4 KiB
32 lines
1.4 KiB
package model
|
|
|
|
import (
|
|
"shop-api/global"
|
|
)
|
|
|
|
type Bill struct {
|
|
global.MG_MODEL
|
|
Platform string `gorm:"size:50" json:"platform"` // 平台 seller(买家端) / customer(客户端) / influencer(网红端)
|
|
UserID string `gorm:"size:50;index" json:"userID"` // 用户id
|
|
Type string `gorm:"size:1;default:1" json:"type"` // 类型 1-佣金 2-订单 3-提现
|
|
Title string `gorm:"size:255" json:"title"` // 账单标题
|
|
OrderID string `gorm:"size:50" json:"order_id"` // 关联订单id
|
|
Price float64 `gorm:"type:decimal(10,2)" json:"price"` // 金额
|
|
Balance float64 `gorm:"type:decimal(10,2)" json:"balance"` // 余额
|
|
Amount int `gorm:"type:int(2);default:1" json:"amount"` // 数量
|
|
Status int `gorm:"type:int(1);default:0" json:"status"` // 类型 1-支出 2-收入
|
|
Receipt int `gorm:"type:tinyint(1)" json:"receipt"` // 是否已到账 1-是 2-否 3-已取消付款
|
|
Remark string `gorm:"size:50" json:"remark"` // 备注
|
|
TransactionId string `gorm:"size:50" json:"transaction_id"` // 交易编号
|
|
}
|
|
type BillView struct {
|
|
OrderID string `json:"order_id"` // 订单编号
|
|
TransactionId string `json:"transaction_id"` // 交易编号
|
|
}
|
|
|
|
func (Bill) TableName() string {
|
|
return "bill"
|
|
}
|
|
func (BillView) TableName() string {
|
|
return "bill"
|
|
}
|
|
|