model

package
v0.0.0-...-1acab93 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MigrateAccount

func MigrateAccount(db *db.DB) error

func MigrateModel

func MigrateModel(db *db.DB) error

Types

type Account

type Account struct {
	bun.BaseModel `bun:"table:users,alias:u"`
	ID            string          `bun:",pk"`
	Name          string          `bun:"name,notnull"`
	Email         string          `bun:"email,unique"`
	ProjectID     string          `bun:"project_id,unique,notnull"`
	Faqs          json.RawMessage `bun:"faqs,type:json"`
	FirebaseID    string          `bun:"firebase_id,unique"`
	CreatedAt     time.Time       `bun:"created_at,nullzero,notnull,default:current_timestamp"`
	UpdatedAt     time.Time       `bun:"updated_at,nullzero,notnull,default:current_timestamp"`
}

func (*Account) String

func (a *Account) String() string

type Model

type Model struct {
	ID           string    `bun:",pk"`
	AgentID      string    `bun:"agent_id,notnull,unique"`
	AgentAliasID string    `bun:"agent_alias_id,notnull,unique"`
	Prompt       string    `bun:"prompt"`
	CreatedAt    time.Time `bun:"created_at,nullzero,notnull,default:current_timestamp"`
	UpdatedAt    time.Time `bun:"updated_at,nullzero,notnull,default:current_timestamp"`
}

Jump to

Keyboard shortcuts

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