models

package
v0.0.0-...-a9f1957 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Base
	Email            string `json:"email" gorm:"unique;not null"`
	TransactionCount int    `json:"transaction_count"`
	Address          string `json:"address" gorm:"unique;not null"`
	HookId           string `json:"hook_id"`
	CurrencyCode     string `json:"currency_code"`
}

func (*Account) Create

func (a *Account) Create(db *gorm.DB) *gorm.DB

func (*Account) Delete

func (a *Account) Delete(db *gorm.DB) *gorm.DB

func (*Account) DeleteHook

func (a *Account) DeleteHook(db *gorm.DB) error

func (*Account) Get

func (a *Account) Get(db *gorm.DB) *gorm.DB

func (*Account) GetByAddress

func (a *Account) GetByAddress(db *gorm.DB) *gorm.DB

func (*Account) IncrementTransactionCount

func (a *Account) IncrementTransactionCount(db *gorm.DB) error

func (*Account) SetupHook

func (a *Account) SetupHook(tx *gorm.DB) (err error)

type Base

type Base struct {
	ID        uuid.UUID `gorm:"type:uuid;primaryKey;"`
	CreatedAt time.Time
	UpdatedAt time.Time
}

func (*Base) BeforeCreate

func (b *Base) BeforeCreate(tx *gorm.DB) error

Jump to

Keyboard shortcuts

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