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.

42 lines
1.9 KiB

package model
import (
"pure-admin/global"
)
type Bill struct {
global.MG_MODEL
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"` // 账单标题
Account string `gorm:"size:50" json:"account"` //收款账户(提现)
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"` //余额
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"` //备注
Platform string `gorm:"size:50" json:"platform"` //平台 seller / customer / influencer
TransactionId string `gorm:"size:50" json:"transaction_id"` // 交易编号
}
type BillList struct {
global.MG_MODEL
UserID string `json:"user_id"` // 用户id
Title string `json:"title"` // 标题
OrderID string `json:"order_id"` // 订单号
Price float64 `json:"price"` // 金额
Status int `json:"status"` // 类型 1-支出 2-收入
Remark string `json:"remark"` // 备注
Platform string `json:"platform"` // 平台 seller / customer / influencer
TransactionId string `json:"transaction_id"` // 交易编号
User UserView `gorm:"-" json:"user"` // 用户信息
}
func (Bill) TableName() string {
return "bill"
}
func (BillList) TableName() string {
return "bill"
}