models

package
v0.0.0-...-94b7579 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Rkey    string `gorm:"uniqueIndex:idx_blocks_rkeyauthor"`
	Author  uint   `gorm:"uniqueIndex:idx_blocks_rkeyauthor"`
	Subject uint
}

type FeedGenerator

type FeedGenerator struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_feedgen_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_feedgen_rkeyauthor"`
	Raw     []byte
	Did     string
}

type Follow

type Follow struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Rkey    string `gorm:"uniqueIndex:idx_follow_rkeyauthor"`
	Author  uint   `gorm:"uniqueIndex:idx_follow_rkeyauthor"`
	Subject uint
}

type Image

type Image struct {
	ID     uint `gorm:"primarykey"`
	Post   uint `gorm:"index"`
	Cid    string
	Did    string
	Mime   string
	Cached bool
	Failed bool
}

type Like

type Like struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_likes_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_likes_rkeyauthor"`
	Subject uint
}

type List

type List struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_lists_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_lists_rkeyauthor"`
	Raw     []byte
}

type ListBlock

type ListBlock struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_listblocks_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_listblocks_rkeyauthor"`
	List    uint
}

type ListItem

type ListItem struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_listitems_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_listitems_rkeyauthor"`
	Subject uint
	List    uint
}

type Post

type Post struct {
	ID        uint `gorm:"primarykey"`
	Created   time.Time
	Indexed   time.Time
	DeletedAt gorm.DeletedAt

	Author   uint   `gorm:"uniqueIndex:idx_post_rkeyauthor"`
	Rkey     string `gorm:"uniqueIndex:idx_post_rkeyauthor"`
	Raw      []byte
	NotFound bool
	Cid      string

	Reposting  uint
	ReplyTo    uint
	ReplyToUsr uint
	InThread   uint
}

type PostCounts

type PostCounts struct {
	Post       uint `gorm:"uniqueindex"`
	Likes      int
	Replies    int
	Reposts    int
	Quotes     int
	ThreadSize int
}

type PostCountsTask

type PostCountsTask struct {
	Post uint
	Op   string
	Val  int
}

type Profile

type Profile struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Repo    uint
	Raw     []byte
}

type Repo

type Repo struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	Did       string `gorm:"uniqueIndex"`
	Handle    string

	// cache fields
	Lk    sync.Mutex `gorm:"-"`
	Setup bool       `gorm:"-"`
}

type Repost

type Repost struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_reposts_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_reposts_rkeyauthor"`
	Subject uint
}

type ThreadGate

type ThreadGate struct {
	ID      uint `gorm:"primarykey"`
	Created time.Time
	Indexed time.Time
	Author  uint   `gorm:"uniqueIndex:idx_threadgate_rkeyauthor"`
	Rkey    string `gorm:"uniqueIndex:idx_threadgate_rkeyauthor"`
	Raw     []byte
	Post    uint
}

Jump to

Keyboard shortcuts

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