schema

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UserRoleAdmin   = "admin"
	UserRoleManager = "manager"
	UserRoleNormal  = "normal"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	gorm.Model
	UserId int64 `gorm:"uniqueIndex"`
	//下面三种信息在库中都是不可重复的
	UserName string  `gorm:"uniqueIndex;size:255"`
	Email    *string `gorm:"uniqueIndex;size:255"`
	Phone    *string `gorm:"uniqueIndex;size:255"`
	Password string
	Roles    string
}

func (*User) GenerateId

func (u *User) GenerateId()

Jump to

Keyboard shortcuts

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