models

package
v0.0.0-...-83e5abf Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Session

type Session struct {
	bun.BaseModel `bun:"table:sessions"`

	ID        int64     `bun:"id,pk,autoincrement"`
	CreatedAt time.Time `bun:"created_at"`
	UUID      uuid.UUID `bun:"uuid"`
	LastIP    string    `bun:"last_ip"`

	UserID int64 `bun:"user_id"`
	User   *User `bun:"rel:belongs-to,join:user_id=id"`
}

type User

type User struct {
	bun.BaseModel `bun:"table:users"`

	ID       int64  `bun:"id,pk,autoincrement"`
	Email    string `bun:"email"`
	Password []byte `bun:"password"`
	Name     string `bun:"name"`
}

Jump to

Keyboard shortcuts

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