Yimaru-BackEnd/internal/domain/transaction.go

79 lines
1.7 KiB
Go

package domain
import "time"
type ShopTransactionType int
const (
TRANSACTION_CASHOUT ShopTransactionType = iota
TRANSACTION_DEPOSIT
)
type PaymentOption int64
const (
CASH_TRANSACTION PaymentOption = iota
TELEBIRR_TRANSACTION
ARIFPAY_TRANSACTION
BANK
)
// ShopTransaction only represents branch transactions
// This is only used for statistic data
type ShopTransaction struct {
ID int64
Amount Currency
BranchID int64
BranchName string
BranchLocation string
CompanyID int64
CashierID int64
CashierName string
BetID int64
NumberOfOutcomes int64
Type ShopTransactionType
PaymentOption PaymentOption
FullName string
PhoneNumber string
// Payment Details for bank
BankCode string
BeneficiaryName string
AccountName string
AccountNumber string
ReferenceNumber string
Verified bool
ApprovedBy ValidInt64
ApproverName ValidString
UpdatedAt time.Time
CreatedAt time.Time
}
type ShopTransactionFilter struct {
CompanyID ValidInt64
BranchID ValidInt64
CashierID ValidInt64
Query ValidString
CreatedBefore ValidTime
CreatedAfter ValidTime
}
type CreateShopTransaction struct {
Amount Currency
BranchID int64
CashierID int64
BetID int64
NumberOfOutcomes int64
Type ShopTransactionType
PaymentOption PaymentOption
FullName string
PhoneNumber string
BankCode string
BeneficiaryName string
AccountName string
AccountNumber string
ReferenceNumber string
BranchName string
BranchLocation string
CompanyID int64
CashierName string
}