You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.3 KiB

3 years ago
package models
import (
"time"
_ "github.com/jinzhu/gorm/dialects/sqlite"
)
// Wallet 钱包保存所有钱包信息。
3 years ago
type Wallet struct {
ID uint `gorm:"AUTO_INCREMENT"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time
Path Path `gorm:"foreignkey:Alias"`
KeystorePasswordHash string
KeyPasswordHash string
KeyStorePath string
WalletAlias string `gorm:"primary_key;unique"`
Addresses []Address `sql:"-"`
TXHistory []TXHistory `gorm:"foreignkey:Alias"`
ProfilePicture string
WalletTag string
DarkMode bool
Currency string
TermsOfService bool
Balance float64 `json:"balance"`
AvailableBalance float64 `json:"available_balance"`
Nonce float64 `json:"nonce"`
TotalBalance float64 `json:"total_balance"`
Delegated float64 `json:"delegated"`
Deposit float64 `json:"deposit"`
Address string `json:"address"`
TokenPrice struct {
DAG struct {
BTC float64 `json:"BTC,omitempty"`
USD float64 `json:"USD,omitempty"`
EUR float64 `json:"EUR,omitempty"`
} `json:"DAG"`
} `json:"token_price"`
}