niki/domain/wallet/entity/transaction.go

30 lines
619 B
Go

package entity
import (
"time"
"git.gocasts.ir/ebhomengo/niki/pkg/types"
"github.com/shopspring/decimal"
)
type Transaction struct {
ID uint64
UserID uint64
Amount decimal.Decimal
Currency types.Currency
ActionType TransactionType
Timestamp time.Time
CreatedAt time.Time
}
func (T Transaction) UnimplementedAllowUseDBGenericFunc() {}
type TransactionType string
const (
TransactionTypeDeposit TransactionType = "deposit"
TransactionTypeWithdraw TransactionType = "withdraw"
TransactionTypeRefund TransactionType = "refund"
TransactionTypeDonate TransactionType = "donate"
)