model

package
v0.0.0-...-edd34d3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TransactionTableName = "Transaction"
View Source
const WalletTableName = "Wallet"

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	ID                   int64          `gorm:"primaryKey;column:id"`
	SourceAccountID      int64          `gorm:"column:source_account_id"`
	DestinationAccountID int64          `gorm:"column:destination_account_id"`
	Amount               int64          `gorm:"column:amount"`
	CreatedAt            time.Time      `gorm:"column:created_time;default:CURRENT_TIMESTAMP"`
	UpdatedAt            time.Time      `gorm:"column:updated_time;default:CURRENT_TIMESTAMP"`
	DeletedAt            gorm.DeletedAt `gorm:"column:deleted_at"`
}

type Wallet

type Wallet struct {
	ID        int64          `gorm:"primaryKey;column:id"`
	Balance   int64          `gorm:"column:balance"`
	Currency  string         `gorm:"column:currency"`
	CreatedAt time.Time      `gorm:"column:created_time;default:CURRENT_TIMESTAMP"`
	UpdatedAt time.Time      `gorm:"column:updated_time;default:CURRENT_TIMESTAMP"`
	DeletedAt gorm.DeletedAt `gorm:"column:deleted_at"`
}

Jump to

Keyboard shortcuts

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