model

package
v0.0.0-...-02a526c Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelUserSet = wire.NewSet(wire.Struct(new(ModelUser), "*"))

Functions

This section is empty.

Types

type ModelUser

type ModelUser struct {
	DB *gorm.DB
}

func (*ModelUser) QueryUserByUserID

func (m *ModelUser) QueryUserByUserID(c *gin.Context, userID string, user *User) error

func (*ModelUser) QueryUserByUsername

func (m *ModelUser) QueryUserByUsername(c *gin.Context, username string, user *User) error

type User

type User struct {
	gorm.Model
	UserID        string `gorm:"index:idx_user_id;unique;varchar(50);not null"`
	Username      string `gorm:"index:idx_username;unique;varchar(30);not null"`
	Password      string `gorm:"varchar(30);not null"`
	Mobile        string `gorm:"index:idx_mobile;unique;varchar(14);not null"`
	Email         string `gorm:"index:idx_email;unique;varchar(30);not null"`
	EmailVerified bool   `gorm:"boolean;not null;default:false"`
}

Jump to

Keyboard shortcuts

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