models

package
v0.0.0-...-479da69 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID        uint64     `gorm:"column:id;primary_key; AUTO_INCREMENT"`
	CreatedAt time.Time  `gorm:"column:created_at"` //创建时间
	UpdatedAt time.Time  `gorm:"column:updated_at"` //更新时间
	DeletedAt *time.Time `gorm:"column:deleted_at"` //(软)删除时间
}

BaseModel 基础模型字段

type User

type User struct {
	BaseModel
	Username string `gorm:"column:username"` //用户名
	Password string `gorm:"column:password"` //密码
}

User 用户表

func (*User) TableName

func (*User) TableName() string

TableName 表名称

Jump to

Keyboard shortcuts

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