models

package
v0.0.0-...-964291d Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoMigrate

func AutoMigrate(connectionString string) error

func NewRepository

func NewRepository(db query, redis *redis.Client) *repository

Types

type ForgetPassword

type ForgetPassword struct {
	ID        pgtype.Int8        `db:"id"`
	CreatedAt pgtype.Timestamptz `db:"created_at"`
	UserID    pgtype.Int8        `db:"user_id"`
	Token     pgtype.Text        `db:"token"`
}

type User

type User struct {
	ID        pgtype.Int8        `db:"id"`
	CreatedAt pgtype.Timestamptz `db:"created_at"`
	Email     pgtype.Text        `db:"email"`
	Password  pgtype.Text        `db:"password"`
	Username  pgtype.Text        `db:"username"`
	Role      pgtype.Text        `db:"role"`
	Verified  pgtype.Bool        `db:"verified"`
	Payload   []byte             `db:"payload"`
}

type VerifyAccount

type VerifyAccount struct {
	ID        pgtype.Int8        `db:"id"`
	CreatedAt pgtype.Timestamptz `db:"created_at"`
	UserID    pgtype.Int8        `db:"user_id"`
	Token     pgtype.Text        `db:"token"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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