model

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameCoin = "coin"
View Source
const TableNameErrorCode = "error_code"
View Source
const TableNameSymbol = "symbol"
View Source
const TableNameUser = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Coin

type Coin struct {
	ID        uint32                `gorm:"column:id;primaryKey;autoIncrement:true;comment:币种ID,也是主键ID" json:"id"`
	CoinName  string                `gorm:"column:coin_name;not null;comment:币种名称" json:"coin_name"`
	Prec      int32                 `gorm:"column:prec;not null;comment:币种精度,小数位保留多少" json:"prec"`
	CreatedAt uint32                `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt uint32                `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"`
	DeletedAt soft_delete.DeletedAt `gorm:"softDelete:unix" json:"deleted_at"`
}

Coin mapped from table <coin>

func (*Coin) TableName

func (*Coin) TableName() string

TableName Coin's table name

type ErrorCode

type ErrorCode struct {
	ID            int32                 `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	ErrorCodeID   int32                 `gorm:"column:error_code_id;not null" json:"error_code_id"`
	ErrorCodeName string                `gorm:"column:error_code_name;not null" json:"error_code_name"`
	Language      string                `gorm:"column:language;not null" json:"language"`
	CreatedAt     uint32                `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt     uint32                `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt     soft_delete.DeletedAt `gorm:"softDelete:unix" json:"deleted_at"`
}

ErrorCode mapped from table <error_code>

func (*ErrorCode) TableName

func (*ErrorCode) TableName() string

TableName ErrorCode's table name

type Symbol

type Symbol struct {
	ID            uint32                `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	SymbolName    string                `gorm:"column:symbol_name;not null" json:"symbol_name"`
	BaseCoinID    uint32                `gorm:"column:base_coin_id;not null;comment:基础币ID" json:"base_coin_id"`
	BaseCoinName  string                `gorm:"column:base_coin_name;not null;comment:基础币名称" json:"base_coin_name"`
	BaseCoinPrec  int32                 `gorm:"column:base_coin_prec;not null;comment:基础币精度" json:"base_coin_prec"`
	QuoteCoinID   uint32                `gorm:"column:quote_coin_id;not null;comment:计价币ID" json:"quote_coin_id"`
	QuoteCoinName string                `gorm:"column:quote_coin_name;not null;comment:计价币名称" json:"quote_coin_name"`
	QuoteCoinPrec int32                 `gorm:"column:quote_coin_prec;not null;comment:计价币精度" json:"quote_coin_prec"`
	CreatedAt     uint32                `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt     uint32                `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"`
	DeletedAt     soft_delete.DeletedAt `gorm:"softDelete:unix" json:"deleted_at"`
}

Symbol mapped from table <symbol>

func (*Symbol) TableName

func (*Symbol) TableName() string

TableName Symbol's table name

type User

type User struct {
	ID        uint32                `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Nickname  string                `gorm:"column:nickname;not null;comment:昵称" json:"nickname"`
	Username  string                `gorm:"column:username;not null;comment:用户名" json:"username"`
	Password  string                `gorm:"column:password;not null" json:"password"`
	CreatedAt uint32                `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt uint32                `gorm:"column:updated_at;not null" json:"updated_at"`
	DeletedAt soft_delete.DeletedAt `gorm:"softDelete:unix" json:"deleted_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