models

package
v0.0.0-...-b497a26 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const UserContextKey = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID         int       `bun:"id,pk,autoincrement"`
	UserID     uuid.UUID `bun:"user_id"`
	Username   string    `bun:"username"`
	CreatedAt  time.Time `bun:"default:'now()'"`
	Title      string    `bun:"title"`
	Bio        string    `bun:"user_bio"`
	Status     string    `bun:"user_status"`
	Department string    `bun:"department"`
	Location   string    `bun:"location"`
}

type AuthenticatedUser

type AuthenticatedUser struct {
	ID          uuid.UUID
	Email       string
	LoggedIn    bool
	AccessToken string
	Account
}

type Task

type Task struct {
	ID          int       `bun:"id,pk,autoincrement"`
	CreatedAt   time.Time `bun:"default:'now()'"`
	Completed   bool
	Title       string    `bun:"title"`
	Description string    `bun:"description"`
	AuthorID    uuid.UUID `bun:"author_id"`

	// Assignee *Account `bun:"rel:belongs-to"`
	Assignee uuid.UUID `bun:"assignee"`
}

Jump to

Keyboard shortcuts

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