models

package
v0.0.0-...-94dccf2 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PasswordToken

type PasswordToken struct {
	bun.BaseModel `bun:"password_tokens,alias:pt"`

	ID   int `bun:"id,pk,autoincrement"`
	Hash string

	CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`

	UserID int
}

type User

type User struct {
	bun.BaseModel `bun:"users,alias:u"`

	ID int `bun:"id,pk,autoincrement"`

	Name string

	Email string

	Password string

	Verified bool

	CreatedAt time.Time `bun:",nullzero,notnull,default:current_timestamp"`

	Tokens []*PasswordToken `bun:"rel:has-many,join:id=user_id"`
}

Jump to

Keyboard shortcuts

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