Yimaru-BackEnd/internal/domain/transaction.go

63 lines
1.3 KiB
Go

package domain
import "time"
type TransactionType int
const (
TRANSACTION_CASHOUT TransactionType = iota
TRANSACTION_DEPOSIT
)
type PaymentOption int64
const (
CASH_TRANSACTION PaymentOption = iota
TELEBIRR_TRANSACTION
ARIFPAY_TRANSACTION
BANK
)
// Transaction only represents when the user cashes out a bet in the shop
// It probably would be better to call it a CashOut or ShopWithdrawal
type Transaction struct {
ID int64
Amount Currency
BranchID int64
CashierID int64
BetID int64
NumberOfOutcomes int64
Type TransactionType
PaymentOption PaymentOption
FullName string
PhoneNumber string
// Payment Details for bank
BankCode string
BeneficiaryName string
AccountName string
AccountNumber string
ReferenceNumber string
Verified bool
ApprovedBy ValidInt64
UpdatedAt time.Time
CreatedAt time.Time
}
type CreateTransaction struct {
Amount Currency
BranchID int64
CashierID int64
BetID int64
NumberOfOutcomes int64
Type TransactionType
PaymentOption PaymentOption
FullName string
PhoneNumber string
// Payment Details for bank
BankCode string
BeneficiaryName string
AccountName string
AccountNumber string
ReferenceNumber string
}