model

package
v0.0.0-...-db9179b Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameSysUser = "sys_user"

Variables

This section is empty.

Functions

This section is empty.

Types

type SysUser

type SysUser struct {
	ID        uint32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Username  string     `gorm:"column:username;not null;uniqueIndex:sys_user_unique,priority:1;comment:账户名" json:"username"` // 账户名
	Password  string     `gorm:"column:password;not null" json:"-"`
	PhoneNo   *string    `gorm:"column:phone_no;uniqueIndex:sys_user_unique_2,priority:1;comment:手机号" json:"phone_no"` // 手机号
	Email     *string    `gorm:"column:email;uniqueIndex:sys_user_unique_1,priority:1" json:"email"`
	Birthday  *time.Time `gorm:"column:birthday;comment:出生日期" json:"birthday"` // 出生日期
	CreatedAt time.Time  `gorm:"column:created_at;not null;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time  `gorm:"column:updated_at;not null;default:CURRENT_TIMESTAMP" json:"updated_at"`
}

SysUser 用户表

func (*SysUser) TableName

func (*SysUser) TableName() string

TableName SysUser's table name

Jump to

Keyboard shortcuts

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