model

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2019 License: MIT Imports: 3 Imported by: 0

README

中文说明

  • 该目录存放mysql相关的业务存储逻辑
  • 一般按照数据库表建立相关go文件,每个go文件编写该表相关的业务存储逻辑
  • 如有关联表的联合查询,可在文件名写relation_前缀

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUserByEmail

func CreateUserByEmail(name, email, passwd, salt string) int64

邮箱注册创建用户

func CreateUserByPhone

func CreateUserByPhone(name, phone, passwd, salt string) int64

手机注册创建用户

func GetUserInfoByEmail

func GetUserInfoByEmail(email string) *builder.User

根据邮箱和密码验证用户登录

func GetUserInfoByPhone

func GetUserInfoByPhone(phone string) *builder.User

根据手机和密码验证用户登录

func IsUserExistByEmail

func IsUserExistByEmail(email string) bool

根据邮箱验证用户是否已存在

func IsUserExistByName

func IsUserExistByName(name string) bool

根据用户昵称验证是否已存在

func IsUserExistByPhone

func IsUserExistByPhone(phone string) bool

根据手机验证用户是否已存在

func UpdateUserInfo

func UpdateUserInfo(id int, data map[string]interface{}) bool

更新用户信息

Types

This section is empty.

Jump to

Keyboard shortcuts

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