model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenHashID

func GenHashID(sLink string, id string) string

Types

type Content

type Content struct {
	SourceID     uint
	HashID       string `gorm:"primary_key"`
	RawID        string
	RawLink      string
	Title        string
	Description  string `gorm:"-"` //ignore to db
	TelegraphURL string
	EditTime
}

Content fetcher content

type EditTime

type EditTime struct {
	CreatedAt time.Time
	UpdatedAt time.Time
}

EditTime timestamp

type Option

type Option struct {
	ID    int `gorm:"primary_key;AUTO_INCREMENT"`
	Name  string
	Value string
	EditTime
}

Option bot 设置

type Source

type Source struct {
	ID         uint `gorm:"primary_key;AUTO_INCREMENT"`
	Link       string
	Title      string
	ErrorCount uint
	Content    []Content
	EditTime
}

type Subscribe

type Subscribe struct {
	ID                 uint `gorm:"primary_key;AUTO_INCREMENT"`
	UserID             int64
	SourceID           uint
	EnableNotification int
	EnableTelegraph    int
	Tag                string
	Interval           int
	WaitTime           int
	EditTime
}

type User

type User struct {
	ID int64 `gorm:"primary_key"`
	EditTime
}

User subscriber

Jump to

Keyboard shortcuts

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