example

package
v0.0.0-...-919d8db Latest Latest
Warning

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

Go to latest
Published: May 17, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metadata

type Metadata[ID ~int64] struct {
	ID        ID
	CreatedAt time.Time `sql:",stored"`
	UpdatedAt time.Time `sql:",stored"`
}

func (*Metadata[ID]) GetID

func (m *Metadata[ID]) GetID() ID

func (*Metadata[ID]) SetUpdatedAt

func (m *Metadata[ID]) SetUpdatedAt(t time.Time)

type ProjectID

type ProjectID safeid.ID

type User

type User struct {
	Metadata[UserID] `json:",inline" sql:",inline"`
	Email            string `json:"email" sql:",stored,unique"`
}

func (User) TableName

func (User) TableName() string

type UserID

type UserID safeid.ID

type UserProject

type UserProject struct {
	Metadata[UserProjectID] `json:",inline" sql:",inline"`
	UserID                  UserID    `sql:",stored,index,fk:User.ID"`
	ProjectID               ProjectID `sql:",stored,index"`
}

func (UserProject) TableName

func (UserProject) TableName() string

type UserProjectID

type UserProjectID safeid.ID

Jump to

Keyboard shortcuts

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