model

package
v0.0.0-...-a5fc328 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	ID                 uuid.UUID  `gorm:"type:uuid;primary_key;" json:"id"`
	UserID             uuid.UUID  `gorm:"type:uuid;column:user_id;not null;" json:"-"`
	SpendingAddress    string     `gorm:"not null;unique_index:idx_address" json:"spending_address"`
	StakingAddress     string     `gorm:"not null" json:"staking_address"`
	ColdStakingAddress string     `gorm:"not null" json:"cold_staking_address"`
	Balance            float64    `json:"balance"`
	CreatedAt          *time.Time `json:"created_at,omitempty"`
	UpdatedAt          *time.Time `json:"update_at,omitempty"`
}

func (*Address) BeforeCreate

func (address *Address) BeforeCreate(scope *gorm.Scope) error

Jump to

Keyboard shortcuts

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