Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListNovelsOptions ¶
type ListNovelsOptions struct {
PageParams storage.PageParams
Genre string // 空字符串=不过滤
Search string // 空字符串=不过滤,按 title LIKE 匹配
}
ListNovelsOptions 是 List 方法的可选过滤条件。零值表示不过滤。
type Novel ¶
type Novel struct {
ID int64 `gorm:"column:id;primaryKey;autoIncrement" json:"id"`
Title string `gorm:"column:title;not null;index" json:"title"`
Genre string `gorm:"column:genre;index" json:"genre"`
Description string `gorm:"column:description" json:"description"`
CreatedAt time.Time `gorm:"column:created_at;autoCreateTime" json:"created_at"`
UpdatedAt time.Time `gorm:"column:updated_at;autoUpdateTime" json:"updated_at"`
}
Novel 是小说索引,记录每部小说的基本信息。 正文存储在 Git 仓库中,路径由 config.NovelDirPath(ID) 实时计算。
Click to show internal directories.
Click to hide internal directories.