Files
projet_gestion_commande/backend/gestion/models/payment.go
T
2026-04-20 19:41:52 +02:00

21 lines
1.0 KiB
Go

package models
import "time"
// CryptoPayment suit un paiement crypto NowPayments lié à une commande
type CryptoPayment struct {
ID int `json:"id" gorm:"primaryKey;autoIncrement"`
CommandID int `json:"command_id" gorm:"column:command_id;index"`
NowPaymentID string `json:"nowpayment_id" gorm:"column:nowpayment_id;not null"`
Status string `json:"status" gorm:"column:status"`
PriceAmount float64 `json:"price_amount" gorm:"column:price_amount"`
PriceCurrency string `json:"price_currency" gorm:"column:price_currency"`
PayCurrency string `json:"pay_currency" gorm:"column:pay_currency"`
PayAddress string `json:"pay_address" gorm:"column:pay_address"`
PayAmount float64 `json:"pay_amount" gorm:"column:pay_amount"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
func (CryptoPayment) TableName() string { return "crypto_payments" }