model

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Favorite

type Favorite struct {
	FavoriteID     int64             `gorm:"primarykey"` // 收藏夹id
	UserID         int64             `gorm:"index"`      // 用户id
	FavoriteName   string            `gorm:"unique"`     // 收藏夹名字
	FavoriteDetail []*FavoriteDetail `gorm:"many2many:f_to_fd;"`
}

type FavoriteDetail

type FavoriteDetail struct {
	FavoriteDetailID int64       `gorm:"primarykey"`
	UserID           int64       // 用户id
	UrlID            int64       // url的id
	Url              string      // url地址
	Desc             string      // url的描述
	Favorite         []*Favorite `gorm:"many2many:f_to_fd;"`
}

type InputData

type InputData struct {
	Id      int64  `gorm:"primarykey"`
	DocId   int64  `gorm:"index"`
	Title   string `gorm:"type:longtext"`
	Body    string `gorm:"type:longtext"`
	Url     string
	Score   float64
	Source  int
	IsIndex bool
}

type User

type User struct {
	UserID         int64  `gorm:"primarykey"`
	UserName       string `gorm:"unique"`
	NickName       string
	PasswordDigest string
}

func (*User) CheckPassword

func (user *User) CheckPassword(password string) bool

CheckPassword 检验密码

func (*User) SetPassword

func (user *User) SetPassword(password string) error

SetPassword 加密密码

Jump to

Keyboard shortcuts

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