model

package
v0.0.0-...-82ff305 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const Schema = `` /* 3277-byte string literal not displayed */

Variables

This section is empty.

Functions

func CreateTables

func CreateTables(db *sqlx.DB)

Types

type List

type List struct {
	Id        uint64    `db:"id"`
	Name      string    `db:"name"`
	OwnerId   uint64    `db:"owner_uid"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type ListEntity

type ListEntity struct {
	Id           sql.NullInt32 `db:"id"`
	LstId        int64         `db:"lst_id"`
	Name         string        `db:"name"`
	ParentDir    string        `db:"parent_dir"`
	FolderName   string        `db:"folder_name"`
	StorageSaved bool          `db:"storage_saved"`
	CreatedAt    time.Time     `db:"created_at"`
	UpdatedAt    time.Time     `db:"updated_at"`
}

func (*ListEntity) Path

func (le *ListEntity) Path() string

type Media

type Media struct {
	Id        int64     `db:"id"`
	UserId    uint64    `db:"user_id"`
	TweetId   int64     `db:"tweet_id"`
	Location  string    `db:"location"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type Token

type Token struct {
	ID               int       `db:"id"`
	Address          string    `db:"address"`
	ChainID          int       `db:"chain_id"`
	Decimals         int       `db:"decimals"`
	Name             string    `db:"name"`
	Symbol           string    `db:"symbol"`
	LogoURI          string    `db:"logo_uri"`
	Tags             string    `db:"tags"`       // JSON string
	Daily            string    `db:"daily"`      // JSON string
	Extensions       string    `db:"extensions"` // JSON string
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	ChromaEmbedded   bool      `db:"chroma_embedded"`
	ChromaDocumentID *string   `db:"chroma_document_id"` // Using pointer to handle NULL
}

Token represents a Jupiter token in PostgreSQL

type TokenEmbedding

type TokenEmbedding struct {
	ID               int       `db:"id"`
	TokenAddress     string    `db:"token_address"`
	ChromaDocumentID string    `db:"chroma_document_id"`
	EmbeddingContent string    `db:"embedding_content"`
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
}

TokenEmbedding represents token embedding tracking in PostgreSQL

func BatchNewTokenEmbeddingsFromTokens

func BatchNewTokenEmbeddingsFromTokens(tokens []Token, chromaDocumentIDs []string) ([]*TokenEmbedding, error)

func NewTokenEmbeddingFromToken

func NewTokenEmbeddingFromToken(token *Token, chromaDocumentID string) *TokenEmbedding

type Tweet

type Tweet struct {
	Id        int64     `db:"id"`
	UserId    uint64    `db:"user_id"`
	TweetId   uint64    `db:"tweet_id"`
	Content   string    `db:"content"`
	TweetTime time.Time `db:"tweet_time"`
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
}

type User

type User struct {
	Id           uint64    `db:"id"`
	ScreenName   string    `db:"screen_name"`
	Name         string    `db:"name"`
	IsProtected  bool      `db:"protected"`
	FriendsCount int       `db:"friends_count"`
	CreatedAt    time.Time `db:"created_at"`
	UpdatedAt    time.Time `db:"updated_at"`
}

type UserEntity

type UserEntity struct {
	Id                sql.NullInt32 `db:"id"`
	Uid               uint64        `db:"user_id"`
	Name              string        `db:"name"`
	ParentDir         string        `db:"parent_dir"`
	FolderName        string        `db:"folder_name"`
	StorageSaved      bool          `db:"storage_saved"`
	MediaCount        sql.NullInt32 `db:"media_count"`
	LatestReleaseTime sql.NullTime  `db:"latest_release_time"`
	CreatedAt         time.Time     `db:"created_at"`
	UpdatedAt         time.Time     `db:"updated_at"`
}

func (*UserEntity) Path

func (ue *UserEntity) Path() string
type UserLink struct {
	Id                   sql.NullInt32 `db:"id"`
	UserTwitterId        uint64        `db:"user_id"`
	Name                 string        `db:"name"`
	ListEntityIdBelongTo int32         `db:"parent_lst_entity_id"`
	StorageSaved         bool          `db:"storage_saved"`
	CreatedAt            time.Time     `db:"created_at"`
	UpdatedAt            time.Time     `db:"updated_at"`
}

func (*UserLink) Path

func (ul *UserLink) Path(db *sqlx.DB) (string, error)

type UserPreviousName

type UserPreviousName struct {
	Id         int       `db:"id"`
	Uid        uint64    `db:"uid"`
	ScreenName string    `db:"screen_name"`
	Name       string    `db:"name"`
	CreatedAt  time.Time `db:"created_at"`
}

Jump to

Keyboard shortcuts

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