models

package
v0.0.0-...-f805a98 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID         string    `json:"id" db:"id"`
	Email      string    `json:"email" validate:"required" db:"email"`
	Password   string    `json:"password" validate:"required" db:"password"`
	Username   string    `json:"username" db:"username"`
	Token      string    `json:"token" db:"token"`
	IsVerified bool      `json:"isVerified" db:"is_verified"`
	CreatedAt  time.Time `json:"createdAt" db:"created_at"`
	UpdatedAt  time.Time `json:"updatedAt" db:"updated_at"`
}

type VerificationData

type VerificationData struct {
	Email     string               `json:"email" validate:"required" db:"email"`
	Code      string               `json:"code" validate:"required" db:"code"`
	ExpiresAt time.Time            `json:"expiresat" db:"expiresat"`
	Type      VerificationDataType `json:"type" db:"type"`
}

VerificationData represents the type for the data stored for verification.

type VerificationDataType

type VerificationDataType int
const (
	MailConfirmation VerificationDataType = iota + 1
	PassReset
)

Jump to

Keyboard shortcuts

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