36 lines
1.9 KiB
Go
36 lines
1.9 KiB
Go
package wallet
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/SamuelTariku/FortuneBet-Backend/internal/domain"
|
|
)
|
|
|
|
type WalletStore interface {
|
|
// GetCompanyByWalletID(ctx context.Context, walletID int64) (domain.Company, error)
|
|
// GetBranchByWalletID(ctx context.Context, walletID int64) (domain.Branch, error)
|
|
CreateWallet(ctx context.Context, wallet domain.CreateWallet) (domain.Wallet, error)
|
|
CreateCustomerWallet(ctx context.Context, customerWallet domain.CreateCustomerWallet) (domain.CustomerWallet, error)
|
|
GetWalletByID(ctx context.Context, id int64) (domain.Wallet, error)
|
|
GetAllWallets(ctx context.Context) ([]domain.Wallet, error)
|
|
GetWalletsByUser(ctx context.Context, id int64) ([]domain.Wallet, error)
|
|
GetAllCustomerWallets(ctx context.Context) ([]domain.GetCustomerWallet, error)
|
|
GetCustomerWallet(ctx context.Context, customerID int64) (domain.GetCustomerWallet, error)
|
|
GetAllBranchWallets(ctx context.Context) ([]domain.BranchWallet, error)
|
|
UpdateBalance(ctx context.Context, id int64, balance domain.Currency) error
|
|
UpdateWalletActive(ctx context.Context, id int64, isActive bool) error
|
|
|
|
GetBalanceSummary(ctx context.Context, filter domain.ReportFilter) (domain.BalanceSummary, error)
|
|
GetTotalWallets(ctx context.Context, filter domain.ReportFilter) (int64, error)
|
|
}
|
|
|
|
type TransferStore interface {
|
|
CreateTransfer(ctx context.Context, transfer domain.CreateTransfer) (domain.Transfer, error)
|
|
GetAllTransfers(ctx context.Context) ([]domain.TransferDetail, error)
|
|
GetTransfersByWallet(ctx context.Context, walletID int64) ([]domain.TransferDetail, error)
|
|
GetTransferByReference(ctx context.Context, reference string) (domain.TransferDetail, error)
|
|
GetTransferByID(ctx context.Context, id int64) (domain.TransferDetail, error)
|
|
UpdateTransferVerification(ctx context.Context, id int64, verified bool) error
|
|
UpdateTransferStatus(ctx context.Context, id int64, status string) error
|
|
}
|