models

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BangumiImage

type BangumiImage struct {
	Common string `json:"common"`
}

Bangumi

type BangumiItem

type BangumiItem struct {
	UpdatedAt   string         `json:"updated_at"`
	Comment     string         `json:"comment"`
	Subject     BangumiSubject `json:"subject"`
	Rate        int            `json:"rate"`
	Type        int            `json:"type"`
	SubjectID   int            `json:"subject_id"`
	SubjectType int            `json:"subject_type"`
}

type BangumiJson

type BangumiJson struct {
	Data []BangumiItem `json:"data"`
}

type BangumiSubject

type BangumiSubject struct {
	ID           int          `json:"id"`
	Name         string       `json:"name"`
	NameCN       string       `json:"name_cn"`
	ShortSummary string       `json:"short_summary"`
	Date         string       `json:"date"`
	Eps          int          `json:"eps"`
	Images       BangumiImage `json:"images"`
}

import from file

type BangumiSubjectDetail

type BangumiSubjectDetail struct {
	ID      int          `json:"id"`
	Type    int          `json:"type"`
	Name    string       `json:"name"`
	NameCN  string       `json:"name_cn"`
	Summary string       `json:"summary"`
	Date    string       `json:"date"`
	Images  BangumiImage `json:"images"`
	Infobox []Infobox    `json:"infobox"`
}

type CategoryView

type CategoryView struct {
	PageTitle    string
	Category     string
	Status       int
	StatusCounts StatusCounts
	CurrentPage  int
	TotalPages   int
	Subjects     []CategoryViewItem
}

type CategoryViewItem

type CategoryViewItem struct {
	SubjectType  string
	SubjectURL   string
	Title        string
	AltTitle     string
	Creator      string
	Press        string
	PubDate      string
	MarkDate     string
	Rating       int
	StatusText   string
	CreatorLabel string
	PressLabel   string
	PubDateLabel string
	ImageURL     string
}

type DoubanBookSubject

type DoubanBookSubject struct {
	Title        string      `json:"title"`
	AltTitle     string      `json:"book_subtitle"`
	PubDate      []string    `json:"pubdate"`
	Author       []string    `json:"author"`
	Press        []string    `json:"press"`
	CardSubtitle string      `json:"card_subtitle"`
	Intro        string      `json:"intro"`
	Type         string      `json:"type"`
	Cover        DoubanCover `json:"pic"`
}

import from api

type DoubanCover

type DoubanCover struct {
	Normal string `json:"normal"`
}

Douban

type DoubanDetail

type DoubanDetail struct {
	Comment string `json:"comment"`
	Rating  struct {
		Value int `json:"value"`
	} `json:"rating"`
	Status     string        `json:"status"`
	CreateTime string        `json:"create_time"`
	Subject    DoubanSubject `json:"subject"`
}

type DoubanDirector

type DoubanDirector struct {
	Name string `json:"name"`
}

type DoubanGameSubject added in v0.4.0

type DoubanGameSubject struct {
	Title       string      `json:"title"`
	TitleCN     string      `json:"cn_name"`
	ReleaseDate string      `json:"release_date"`
	Developer   []string    `json:"developers"`
	Publisher   []string    `json:"publishers"`
	Intro       string      `json:"intro"`
	Type        string      `json:"type"`
	Cover       DoubanCover `json:"pic"`
}

type DoubanItem

type DoubanItem struct {
	Type     string       `json:"type"`
	Status   string       `json:"status"`
	Interest DoubanDetail `json:"interest"`
}

type DoubanJson

type DoubanJson struct {
	Interest []DoubanItem `json:"interest"`
}

type DoubanMovieSubject

type DoubanMovieSubject struct {
	Title        string           `json:"title"`
	AltTitle     string           `json:"original_title"`
	PubDate      []string         `json:"pubdate"`
	Directors    []DoubanDirector `json:"directors"`
	CardSubtitle string           `json:"card_subtitle"`
	Intro        string           `json:"intro"`
	Type         string           `json:"type"`
	Cover        DoubanCover      `json:"pic"`
}

type DoubanSubject

type DoubanSubject struct {
	Title        string            `json:"title"`
	AltTitle     *string           `json:"book_subtitle"`
	URL          string            `json:"url"`
	PubDate      []string          `json:"pubdate"`
	Directors    *[]DoubanDirector `json:"directors"`
	Author       *[]string         `json:"author"`
	Press        *[]string         `json:"press"`
	CardSubtitle string            `json:"card_subtitle"`
	Intro        *string           `json:"intro"`
	Type         string            `json:"type"`
	Cover        DoubanCover       `json:"pic"`
}

import from file

type HomeView

type HomeView struct {
	PageTitle    string
	FewBooks     bool
	FewMovies    bool
	FewTVs       bool
	FewAnimes    bool
	FewGames     bool
	RecentBooks  []HomeViewItem
	RecentMovies []HomeViewItem
	RecentTVs    []HomeViewItem
	RecentAnimes []HomeViewItem
	RecentGames  []HomeViewItem
}

type HomeViewItem

type HomeViewItem struct {
	SubjectURL string
	Title      string
	MarkDate   string
	IsDoing    bool
	ImageURL   string
}

type Infobox

type Infobox struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

import from api

type SearchView

type SearchView struct {
	PageTitle   string
	Query       string
	QueryType   string
	TotalCount  int64
	CurrentPage int
	TotalPages  int
	Subjects    []CategoryViewItem
}

type StatusCounts

type StatusCounts struct {
	All     int64
	Todo    int64
	Doing   int64
	Done    int64
	OnHold  int64
	Dropped int64
}

type Subject

type Subject struct {
	ID          uint   `gorm:"primaryKey;index:idx_type_status_id;column:id"`
	UUID        string `gorm:"size:36;unique;column:uuid"`
	SubjectType string `gorm:"size:16;index:idx_type_status_id;column:subject_type"`
	Title       string `gorm:"size:255;index:idx_title;column:title"`
	AltTitle    string `gorm:"size:255;column:alt_title"`
	Creator     string `gorm:"size:512;column:creator"`
	Press       string `gorm:"size:255;column:press"`
	Status      int    `gorm:"index:idx_type_status_id;column:status"`
	Rating      int    `gorm:"column:rating"`
	ExternalURL string `gorm:"size:255;index:idx_external_url;column:external_url"`
	HasImage    int    `gorm:"column:has_image"`
	Summary     string `gorm:"type:text;column:summary"`
	Comment     string `gorm:"type:text;column:comment"`
	PubDate     string `gorm:"size:36;column:pub_date"`
	MarkDate    string `gorm:"size:36;column:mark_date"`
	CreatedAt   int64  `gorm:"column:created_at"`
	UpdatedAt   int64  `gorm:"column:updated_at"`
}

Database / Detail Status - 1: 想看, 2: 在看, 3: 已看 (4: 搁置, 5: 抛弃)

func (Subject) TableName

func (Subject) TableName() string

type SubjectExport

type SubjectExport struct {
	Subjects   []SubjectExportItem `json:"subjects"`
	ExportTime string              `json:"export_time"`
	TotalCount int                 `json:"total_count"`
}

type SubjectExportAPI added in v0.5.0

type SubjectExportAPI struct {
	Subjects     []SubjectExportItem `json:"subjects"`
	ResponseTime string              `json:"response_time"`
	TotalCount   int                 `json:"total_count"`
	Limit        int                 `json:"limit"`
	Offset       int                 `json:"offset"`
}

type SubjectExportItem

type SubjectExportItem struct {
	UUID        string `json:"uuid"`
	SubjectType string `json:"subject_type"`
	Title       string `json:"title"`
	AltTitle    string `json:"alt_title"`
	PubDate     string `json:"pub_date"`
	Creator     string `json:"creator"`
	Press       string `json:"press"`
	Status      int    `json:"status"`
	Rating      int    `json:"rating"`
	Summary     string `json:"summary"`
	Comment     string `json:"comment"`
	ExternalURL string `json:"external_url"`
	MarkDate    string `json:"mark_date"`
	CreatedAt   string `json:"created_at"`
}

type SubjectManagePage

type SubjectManagePage struct {
	PageTitle  string
	ManageType int
	Subject    interface{}
}

ManageType - 1: 显示, 2: 编辑, 3: 新增(手动), 4: 新增(自动)

type SubjectSummary

type SubjectSummary struct {
	UUID        string
	SubjectType string
	Title       string
	AltTitle    string
	Creator     string
	Press       string
	Status      int
	Rating      int
	HasImage    int
	PubDate     string
	MarkDate    string
}

type SubjectView

type SubjectView struct {
	PageTitle       string
	ManageType      int
	CreatorLabel    string
	PressLabel      string
	PubDateLabel    string
	SummaryLabel    string
	StatusText      string
	RatingStar      int
	ImageURL        string
	ExternalURLIcon template.HTML
	Subject         Subject
}

Jump to

Keyboard shortcuts

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