node_order_payments.go 1.6 KB

1234567891011121314151617181920212223242526272829
  1. package app
  2. // 引入关联包
  3. import (
  4. "github.com/shopspring/decimal"
  5. )
  6. type NodeOrderPayments struct {
  7. Id int64 `json:"id" gorm:"column:id;type:bigint;comment:id;primarykey;NOT NULL"`
  8. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;comment:创建时间"`
  9. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;comment:更新时间"`
  10. PaymentRecordId string `json:"paymentRecordId" gorm:"column:payment_record_id;type:varchar(64);comment:支付订单ID;index;unique:uni_node_order_payments_payment_record_id"`
  11. NodeOrderRecordId string `json:"nodeOrderRecordId" gorm:"column:node_order_record_id;type:varchar(64);comment:节点购买记录ID;index"`
  12. UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;comment:用户ID;index"`
  13. Uid string `json:"uid" gorm:"column:uid;type:varchar(64);comment:用户交易所ID:;index"`
  14. OrderUsdAmount decimal.Decimal `json:"orderUsdAmount" gorm:"column:order_usd_amount;type:decimal(25,8);comment:订单总价值"`
  15. PaySymbol string `json:"paySymbol" gorm:"column:pay_symbol;type:varchar(64);comment:支付币种"`
  16. PaySymbolUsdPrice decimal.Decimal `json:"paySymbolUsdPrice" gorm:"column:pay_symbol_usd_price;type:decimal(25,8);comment:支付币种单价"`
  17. PayQuantity decimal.Decimal `json:"payQuantity" gorm:"column:pay_quantity;type:decimal(25,8);comment:支付数量"`
  18. PayUsdAmount decimal.Decimal `json:"payUsdAmount" gorm:"column:pay_usd_amount;type:decimal(25,8);comment:支付总价值"`
  19. }
  20. func (*NodeOrderPayments) TableName() string {
  21. return "node_order_payments"
  22. }
  23. func NewNodeOrderPayments() *NodeOrderPayments {
  24. return &NodeOrderPayments{}
  25. }