models

package
v0.0.0-...-e0ac650 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FeedTable

func FeedTable(f Feed) func(tx *gorm.DB) *gorm.DB

Types

type Account

type Account struct {
	// Database related fields
	ID        uint           `gorm:"primarykey" json:"-"`
	CreatedAt time.Time      `json:"-"`
	UpdatedAt time.Time      `json:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`

	types.Account
	types.OnChainStatusManageForAccount
}

type Character

type Character struct {
	// Database related fields
	CreatedAt time.Time      `json:"created_at"`
	UpdatedAt time.Time      `json:"-"`
	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`

	types.Character
}

type Feed

type Feed struct {
	// Database related fields
	ID        uint      `gorm:"primarykey" json:"-"`
	CreatedAt time.Time `gorm:"index" json:"-"`

	types.Feed
	types.OnChainData
}

type FeedsArray

type FeedsArray []Feed

func (FeedsArray) Len

func (feeds FeedsArray) Len() int

func (FeedsArray) Less

func (feeds FeedsArray) Less(i, j int) bool

func (FeedsArray) Swap

func (feeds FeedsArray) Swap(i, j int)

type Media

type Media struct {
	// Database related fields
	ID        uint      `gorm:"primarykey" json:"-"`
	CreatedAt time.Time `gorm:"index" json:"-"`

	// Structure related
	CrossbellCharacterID string               `gorm:"index" json:"crossbell_character_id"`
	RelatedFeeds         MediaFeedRecordArray `gorm:"type:text" json:"related_feeds"`

	commonTypes.Media
}

type MediaFeedRecord

type MediaFeedRecord struct {
	Platform string `json:"platform"`
	ID       uint   `json:"id"`
}

type MediaFeedRecordArray

type MediaFeedRecordArray []MediaFeedRecord

func (*MediaFeedRecordArray) Scan

func (fa *MediaFeedRecordArray) Scan(src interface{}) error

func (MediaFeedRecordArray) Value

func (fa MediaFeedRecordArray) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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