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.
37 lines
1.4 KiB
37 lines
1.4 KiB
package model
|
|
|
|
import "service-api/global"
|
|
|
|
type UserWallet struct {
|
|
global.BASE_ID
|
|
UserID string `gorm:"size:50;index" json:"user_id"` //用户id
|
|
WalletName string `gorm:"size:50" json:"wallet_name"` //钱包名
|
|
WalletAddress string `gorm:"size:50;index" json:"wallet_address"` //钱包地址
|
|
WalletBalance float64 `gorm:"size:50" json:"wallet_balance"` //钱包余额
|
|
WalletBalanceUsd float64 `gorm:"-" json:"wallet_balance_usd"` //钱包余额(美金)
|
|
Password string `gorm:"size:16" json:"password"` //钱包密码
|
|
PrivateKey string `gorm:"size:255" json:"-"` //私钥
|
|
PublicKey string `gorm:"size:300" json:"-"` //公钥
|
|
}
|
|
|
|
type UserWalletDesc struct {
|
|
WalletName string `gorm:"size:50" json:"wallet_name"` //钱包名
|
|
WalletAddress string `gorm:"size:50;index" json:"wallet_address"` //钱包地址
|
|
WalletBalance float64 `gorm:"size:50" json:"wallet_balance"` //钱包余额
|
|
WalletBalanceUsd float64 `gorm:"-" json:"wallet_balance_usd"` //钱包余额(美金)
|
|
}
|
|
|
|
type Account struct {
|
|
ID string `json:"id"`
|
|
Address string `json:"address"`
|
|
PrivateKey string `json:"privateKey"`
|
|
PublicKey string `json:"publicKey"`
|
|
}
|
|
|
|
func (UserWallet) TableName() string {
|
|
return "user_wallet"
|
|
}
|
|
|
|
func (UserWalletDesc) TableName() string {
|
|
return "user_wallet"
|
|
}
|
|
|