package model

import "time"

const (
	// BuffRefillPriceRUB is the price in rubles to refill any regular buff's charges.
	BuffRefillPriceRUB = 50
	// ResurrectionRefillPriceRUB is the price in rubles to refill resurrection charges.
	ResurrectionRefillPriceRUB = 150
)

// PaymentType identifies the kind of purchase.
type PaymentType string

const (
	PaymentBuffReplenish         PaymentType = "buff_replenish"
	PaymentResurrectionReplenish PaymentType = "resurrection_replenish"
)

// PaymentStatus tracks the lifecycle of a payment.
type PaymentStatus string

const (
	PaymentPending   PaymentStatus = "pending"
	PaymentCompleted PaymentStatus = "completed"
	PaymentFailed    PaymentStatus = "failed"
)

// Payment records a purchase transaction.
type Payment struct {
	ID          int64         `json:"id"`
	HeroID      int64         `json:"heroId"`
	Type        PaymentType   `json:"type"`
	BuffType    string        `json:"buffType,omitempty"`
	AmountRUB   int           `json:"amountRub"`
	Status      PaymentStatus `json:"status"`
	CreatedAt   time.Time     `json:"createdAt"`
	CompletedAt *time.Time    `json:"completedAt,omitempty"`
}
