dao

package
v0.0.0-...-81f72a3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 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 Dao

type Dao struct {
	// contains filtered or unexported fields
}

func New

func New(engine *gorm.DB) *Dao

func (*Dao) CreateAttachment

func (d *Dao) CreateAttachment(attachment *model.Attachment) (*model.Attachment, error)

func (*Dao) CreateUser

func (d *Dao) CreateUser(user *model.User) (*model.User, error)

创建用户

func (*Dao) GetUserByID

func (d *Dao) GetUserByID(id int64) (*model.User, error)

根据用户ID获取用户

func (*Dao) GetUserByPhone

func (d *Dao) GetUserByPhone(phone string) (*model.User, error)

根据手机号获取用户

func (*Dao) GetUserByUsername

func (d *Dao) GetUserByUsername(username string) (*model.User, error)

根据用户名获取用户

func (*Dao) GetUsersByIDs

func (d *Dao) GetUsersByIDs(ids []int64) ([]*model.User, error)

根据IDs获取用户列表

func (*Dao) GetUsersByKeyword

func (d *Dao) GetUsersByKeyword(keyword string) ([]*model.User, error)

根据关键词模糊获取用户列表

func (*Dao) UpdateUser

func (d *Dao) UpdateUser(user *model.User) error

更新用户

type JuhePhoneCaptchaRsp

type JuhePhoneCaptchaRsp struct {
	ErrorCode int    `json:"error_code"`
	Reason    string `json:"reason"`
}

Jump to

Keyboard shortcuts

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