model

package
v0.0.0-...-4a9023c Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	gorm.Model
	Title    string
	Content  string
	Author   string
	Creator  uint `gorm:"creator"`
	Modifier uint `gorm:"modifier"`
	User     User
	UserID   uint
}

type User

type User struct {
	gorm.Model
	Username string `gorm:"uniqueIndex;not nul"`
	Email    string `gorm:"uniqueIndex;not null"`
	Password string `gorm:"not null"`
	RoleType uint   `gorm:"role_type"`
	Creator  uint   `gorm:"creator"`
	Modifier uint   `gorm:"modifier"`
}

func (*User) CheckPassword

func (u *User) CheckPassword(plain string) bool

func (*User) HashPassword

func (u *User) HashPassword(plain string) (string, error)

Jump to

Keyboard shortcuts

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