model

package
v0.0.0-...-f6cb80d Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoAuth = rpc.NewError(errorCodeBase+1, codes.Unauthenticated, "no auth")
	ErrNoPerm = rpc.NewError(errorCodeBase+2, codes.PermissionDenied, "no perm")
)

Functions

This section is empty.

Types

type User

type User struct {
	ID          int       `db:"id"`
	Username    string    `db:"username"`
	FirstName   string    `db:"first_name"`
	LastName    string    `db:"last_name"`
	Phone       string    `db:"phone"`
	Email       string    `db:"email"`
	Password    string    `db:"password"`
	LastLoginAt time.Time `db:"last_login_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	CreatedAt   time.Time `db:"created_at"`
}

type UserToken

type UserToken struct {
	ID        int       `db:"id"`
	Token     string    `db:"token"`
	IP        string    `db:"ip"`
	UserID    int       `db:"user_id"`
	ExpireAt  time.Time `db:"expire_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

Directories

Path Synopsis
repository
db

Jump to

Keyboard shortcuts

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