model

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt soft_delete.DeletedAt

	Name *string `gorm:"name;not null"`
	Link *string `gorm:"link;not null"` // FIX: unique index?
	// LastBuild is the last time the content of the feed changed
	LastBuild *time.Time `gorm:"last_build"`
	// Failure is the reason of failure. If it is not null or empty, the fetch processor
	// should skip this feed
	Failure   *string `gorm:"failure;default:''"`
	Suspended *bool   `gorm:"suspended;default:false"`

	FeedRequestOptions

	GroupID uint
	Group   Group
}

func (Feed) IsFailed added in v0.3.0

func (f Feed) IsFailed() bool

func (Feed) IsSuspended added in v0.3.0

func (f Feed) IsSuspended() bool

type FeedRequestOptions added in v0.8.0

type FeedRequestOptions struct {
	ReqProxy *string `gorm:"req_proxy"`
}

type Group

type Group struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt soft_delete.DeletedAt `gorm:"uniqueIndex:idx_name"`

	Name *string `gorm:"name;not null;uniqueIndex:idx_name"`
}

type Item

type Item struct {
	ID        uint `gorm:"primarykey"`
	CreatedAt time.Time
	UpdatedAt time.Time
	DeletedAt soft_delete.DeletedAt `gorm:"uniqueIndex:idx_guid"`

	Title    *string    `gorm:"title"`
	GUID     *string    `gorm:"guid;uniqueIndex:idx_guid"`
	Link     *string    `gorm:"link"`
	Content  *string    `gorm:"content"`
	PubDate  *time.Time `gorm:"pub_date"`
	Unread   *bool      `gorm:"unread;default:true;index"`
	Bookmark *bool      `gorm:"bookmark;default:false;index"`

	FeedID uint `gorm:"feed_id;uniqueIndex:idx_guid"`
	Feed   Feed
}

Jump to

Keyboard shortcuts

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