active.account.log.go 2.2 KB

1234567891011121314151617181920212223242526272829303132
  1. package shanghu
  2. import (
  3. "github.com/shopspring/decimal"
  4. "time"
  5. )
  6. type ActiveClientAccountLog struct {
  7. ID int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"` // 主键
  8. ReviewAmountAfter decimal.Decimal `gorm:"column:review_amount_after;type:decimal(10,2)" json:"review_amount_after"` // 审核资金 交易后
  9. ReviewAmountPre decimal.Decimal `gorm:"column:review_amount_pre;type:decimal(10,2)" json:"review_amount_pre"` // 审核资金 交易前
  10. AmountPre decimal.Decimal `gorm:"column:amount_pre;type:decimal(10,2)" json:"amount_pre"` // 交易前
  11. AmountAfter decimal.Decimal `gorm:"column:amount_after;type:decimal(10,2)" json:"amount_after"` // 交易后
  12. TransType int `gorm:"column:trans_type;type:int(11)" json:"trans_type"` // 交易类型 1-拼团核销入账 3-提现
  13. ClientOpenID string `gorm:"column:client_open_id;type:varchar(255)" json:"client_open_id"` // 客户openid
  14. CreateBy int64 `gorm:"column:create_by;type:bigint(20)" json:"create_by"` // 创建者
  15. UpdateBy int64 `gorm:"column:update_by;type:bigint(20)" json:"update_by"` // 更新者
  16. CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` // 创建时间
  17. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` // 最后更新时间
  18. DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"` // 删除时间
  19. Amount decimal.Decimal `gorm:"column:amount;type:decimal(10,2)" json:"amount"` // 交易金额
  20. PayTransID int64 `gorm:"column:pay_trans_id;type:bigint(20)" json:"pay_trans_id"` // 交易id
  21. }
  22. const (
  23. ActiveClientAccountLogTransTypeGroupBuy = 1 //拼团入账
  24. ActiveClientAccountLogTypeCashOut = 2 //提现
  25. )
  26. func (m *ActiveClientAccountLog) TableName() string {
  27. return "active_client_account_log"
  28. }