forked from ebhomengo/niki
30 lines
885 B
Go
30 lines
885 B
Go
package param
|
|
|
|
import (
|
|
"time"
|
|
|
|
"git.gocasts.ir/ebhomengo/niki/domain/wallet/entity"
|
|
"git.gocasts.ir/ebhomengo/niki/pkg/database/postgres"
|
|
"git.gocasts.ir/ebhomengo/niki/pkg/types"
|
|
"github.com/shopspring/decimal"
|
|
)
|
|
|
|
type TransactionRequest struct {
|
|
UserID uint64 `json:"user_id"`
|
|
Pagination postgres.RequestPagination `json:"pagination"`
|
|
}
|
|
|
|
type TransactionResponse struct {
|
|
Transaction []TransactionInfo `json:"transactions"`
|
|
Pagination postgres.ResponsePagination `json:"pagination"`
|
|
}
|
|
|
|
type TransactionInfo struct {
|
|
ID uint64 `json:"id"`
|
|
UserID uint64 `json:"user_id"`
|
|
Amount decimal.Decimal `json:"amount,string"`
|
|
Currency types.Currency `json:"currency"`
|
|
ActionType entity.TransactionType `json:"action_type"`
|
|
Timestamp time.Time `json:"timestamp"`
|
|
}
|