model

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameAsset = "asset"
View Source
const TableNameUser = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	ID           int64  `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UserID       int64  `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"`
	Username     string `gorm:"column:username;comment:用户名" json:"username"`
	CoinID       int32  `gorm:"column:coin_id;not null;comment:数字货币ID" json:"coin_id"`
	CoinName     string `gorm:"column:coin_name;not null;comment:数字货币名称" json:"coin_name"`
	AvailableQty string `gorm:"column:available_qty;not null;comment:可用余额" json:"available_qty"`
	FrozenQty    string `gorm:"column:frozen_qty;not null;comment:冻结金额" json:"frozen_qty"`
	CreatedAt    int64  `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt    int64  `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"`
}

Asset mapped from table <asset>

func (*Asset) TableName

func (*Asset) TableName() string

TableName Asset's table name

type User

type User struct {
	ID          int32  `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Username    string `gorm:"column:username;not null;comment:用户名" json:"username"`
	Password    string `gorm:"column:password;not null;comment:密码" json:"password"`
	PhoneNumber int64  `gorm:"column:phone_number;not null;comment:手机号" json:"phone_number"`
	Status      int32  `gorm:"column:status;not null;comment:用户状态,1正常2锁定" json:"status"`
	CreatedAt   int64  `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt   int64  `gorm:"column:updated_at;not null;comment:更新时间" json:"updated_at"`
}

User mapped from table <user>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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