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.

52 lines
2.4 KiB

9 months ago
package model
import (
"pure/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-提现 4-平台奖励
Title string `gorm:"size:255" json:"title"` // 账单标题
ClaimNo string `json:"claim_no"` //领取任务编号
Account string `gorm:"size:50" json:"account"` //收款账户(提现)
OrderID string `gorm:"size:50" json:"order_id"` //关联订单id
WithdID string `gorm:"size:50" json:"withd_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-已取消付款
WithdrawalStatus int `gorm:"type:tinyint(1)" json:"withdrawalStatus"` //提现状态 0-提现中 1-提现完成 2-提现失败
CheckStatus string `gorm:"size:1" json:"check_status"` // 审核状态 0:待审核 1:审核通过 2:审核未通过
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 BillView struct {
ID uint `json:"id"` // id
OrderID string `json:"order_id"` // 订单编号
TransactionId string `json:"transaction_id"` // 交易编号
}
type BillNotify struct {
Title string `json:"title"` // 标题
RelationType string `json:"relation_type"` // 关联类型
RelationId string `json:"relation_id"` // 关联id
}
type BillFlowData struct {
Status int `json:"status"`
Price float64 `json:"price"`
}
func (Bill) TableName() string {
return "bill"
}
func (BillView) TableName() string {
return "bill"
}