package entity

import (
	"encoding/json"
	"time"
)

type TransactionType string

const (
	TransactionTypeRequest TransactionType = "request"
	TransactionTypeVerify  TransactionType = "verify"
)

type TransactionStatus string

const (
	TransactionStatusPending = "Pending"
	TransactionStatusSuccess = "Success"
	TransactionStatusFailed  = "Failed"
)

type PaymentTransaction struct {
	ID           uint
	PaymentID    uint
	Type         TransactionType
	RequestData  json.RawMessage
	ResponseData json.RawMessage
	RefID        string
	Status       TransactionStatus
	GatewayToken string
	ErrorMessage string
	CreatedAt    time.Time
	UpdatedAt    time.Time
}
