models

package
v0.0.0-...-855d15e Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IDConstraint

type IDConstraint interface {
	~string | ~int | uuid.UUID
}

type Identity

type Identity[ID IDConstraint] struct {
	Id ID `json:"id"`
}

type TimeStamps

type TimeStamps struct {
	CreatedAt time.Time `json:"created_at" db:"created_at"`
	UpdatedAt time.Time `json:"updated_at" db:"updated_at"`
}

type User

type User struct {
	Identity[uuid.UUID]
	Email    string `json:"email"`
	Password string `json:"password"`
	TimeStamps
}

func (*User) ComparePassword

func (u *User) ComparePassword(password string) error

Jump to

Keyboard shortcuts

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