migrations

package
v0.0.0-...-6da63fb Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Migrations = migrate.NewMigrations()

Functions

This section is empty.

Types

type OAuthIdentity

type OAuthIdentity struct {
	bun.BaseModel `bun:"table:oauth_identities,alias:oi"`

	ID         string    `bun:"id,pk,type:text"`
	UserID     string    `bun:"user_id,notnull,type:text"`
	Provider   string    `bun:"provider,notnull,type:text"`    // 'google'
	ProviderID string    `bun:"provider_id,notnull,type:text"` // Google sub
	Email      string    `bun:"email,type:text"`
	CreatedAt  time.Time `bun:"created_at,notnull,default:current_timestamp"`
}

type Registry

type Registry struct {
	bun.BaseModel `bun:"table:registry,alias:r"`

	ID        string    `bun:"id,pk,type:text"`
	OwnerID   string    `bun:"owner_id,notnull,type:text"`
	Key       string    `bun:"key,notnull"`
	Value     string    `bun:"value,notnull"`
	CreatedAt time.Time `bun:"created_at,notnull,default:current_timestamp"`
	UpdatedAt time.Time `bun:"updated_at,notnull,default:current_timestamp"`
}

type RegistryWithEncryption

type RegistryWithEncryption struct {
	bun.BaseModel `bun:"table:registry,alias:r"`

	ID          string    `bun:"id,pk,type:text"`
	OwnerID     string    `bun:"owner_id,notnull,type:text"`
	Key         string    `bun:"key,notnull"`
	Value       string    `bun:"value,notnull"`
	IsEncrypted bool      `bun:"is_encrypted,notnull,default:false"`
	CreatedAt   time.Time `bun:"created_at,notnull,default:current_timestamp"`
	UpdatedAt   time.Time `bun:"updated_at,notnull,default:current_timestamp"`
}

RegistryWithEncryption represents the registry table with the is_encrypted column

type User

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

	ID             string    `bun:"id,pk,type:text"`
	DisplayName    string    `bun:"display_name,notnull"`
	Username       string    `bun:"username,notnull,unique"`
	HashedPassword string    `bun:"hashed_password,notnull"`
	Role           string    `bun:"role,notnull,default:'user'"`
	IsActive       bool      `bun:"is_active,notnull,default:true"`
	CreatedAt      time.Time `bun:"created_at,notnull,default:current_timestamp"`
	UpdatedAt      time.Time `bun:"updated_at,notnull,default:current_timestamp"`
}

Jump to

Keyboard shortcuts

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