model

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 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"`
	// 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:''"`

	GroupID uint
	Group   Group
}

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

	Title   *string    `gorm:"title;not null;index"`
	GUID    *string    `gorm:"guid,index"`
	Link    *string    `gorm:"link,index"`
	Content *string    `gorm:"content"`
	PubDate *time.Time `gorm:"pub_date"`
	Unread  *bool      `gorm:"unread;default:true"`

	FeedID uint `gorm:"feed_id;index"`
	Feed   Feed
}

Jump to

Keyboard shortcuts

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