model

package
v0.0.0-...-69bdcc1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameConfig = "config"
View Source
const TableNameUser = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	ID        int64     `gorm:"column:id;type:INTEGER" json:"id"`
	Config    string    `gorm:"column:config;type:TEXT" json:"config"`
	Value     string    `gorm:"column:value;type:TEXT" json:"value"`
	Num       int64     `gorm:"column:num;type:INTEGER" json:"num"`
	Extra     string    `gorm:"column:extra;type:TEXT" json:"extra"`
	CreatedAt time.Time `gorm:"column:created_at;type:datetime" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;type:datetime" json:"updated_at"`
}

Config mapped from table <config>

func (*Config) TableName

func (*Config) TableName() string

TableName Config's table name

type User

type User struct {
	ID          int64     `gorm:"column:id;type:INTEGER" json:"id"`
	Name        string    `gorm:"column:name;type:TEXT" json:"name"`
	Password    string    `gorm:"column:password;type:TEXT" json:"password"`
	Header      string    `gorm:"column:header;type:TEXT" json:"header"`
	Gender      string    `gorm:"column:gender;type:TEXT" json:"gender"`
	Role        string    `gorm:"column:role;type:TEXT" json:"role"`
	Status      int64     `gorm:"column:status;type:INTEGER" json:"status"`
	AuthVersion int64     `gorm:"column:auth_version;type:INTEGER" json:"auth_version"`
	Sign        string    `gorm:"column:sign;type:TEXT" json:"sign"`
	CreatedAt   time.Time `gorm:"column:created_at;type:datetime" json:"created_at"`
	UpdatedAt   time.Time `gorm:"column:updated_at;type:datetime" 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