balance

package
v0.0.0-...-30aa3f0 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(ctx context.Context, sc *spanner.Client) (*Store, error)

func (*Store) Deposit

func (s *Store) Deposit(ctx context.Context, userID string, amount int64, point int64) (userBalance *UserBalance, userDepositHistories *UserDepositHistory, err error)

func (*Store) UserBalanceTable

func (s *Store) UserBalanceTable() string

func (*Store) UserDepositHistoryTable

func (s *Store) UserDepositHistoryTable() string

type UserBalance

type UserBalance struct {
	UserID    string
	Amount    int64
	Point     int64
	CreatedAt time.Time
	UpdatedAt time.Time
}

type UserDepositHistory

type UserDepositHistory struct {
	DepositID string
	UserID    string
	Amount    int64
	Point     int64
	CreatedAt time.Time
}

Jump to

Keyboard shortcuts

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