domain

package
v0.0.0-...-405484a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RefreshToken

type RefreshToken struct {
	ID        int64
	UserID    int64
	Token     string
	ExpiresAt time.Time
}

type Transaction

type Transaction struct {
	Id               int64     `json:"id" db:"id"`
	WalletID         int64     `json:"walletId" db:"wallet_id"`
	Description      string    `json:"description" db:"description"`
	Amount           float64   `json:"amount" db:"amount"`
	BalanceAfter     float64   `json:"balanceAfter" db:"balance_after"`
	CommissionAmount float64   `json:"commissionAmount" db:"commission_amount"`
	Currency         string    `json:"currency" db:"currency"`
	CreatedAt        time.Time `json:"createdAt" db:"created_at"`
}

type UpdateTransactionInput

type UpdateTransactionInput struct {
	Description      *string  `json:"description"`
	Amount           *float64 `json:"amount"`
	BalanceAfter     *float64
	CommissionAmount *float64 `json:"commissionAmount"`
	Currency         *string  `json:"currency"`
}

func (UpdateTransactionInput) Validate

func (i UpdateTransactionInput) Validate() error

type UpdateWalletInput

type UpdateWalletInput struct {
	Name     *string `json:"name"`
	Currency *string `json:"currency"`
}

func (UpdateWalletInput) Validate

func (i UpdateWalletInput) Validate() error

type User

type User struct {
	ID         int64  `json:"-" db:"id"`
	Email      string `json:"email" binding:"required"`
	Username   string `json:"username" binding:"required"`
	Password   string `json:"password" binding:"required"`
	RegisterAt time.Time
}

type Wallet

type Wallet struct {
	ID         int       `json:"id" db:"id"`
	UserId     int64     `json:"user_id" db:"user_id"`
	Name       string    `json:"name" db:"name" binding:"required"`
	Balance    float64   `json:"balance" db:"balance"`
	Currency   string    `json:"currency" db:"currency"`
	RegisterAt time.Time `json:"register_at" db:"register_at"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL