Documentation ¶
Index ¶
- func ApplySuggestion(db *gorm.DB, suggestion Suggestion)
- func Init(dbName string) *gorm.DB
- func SaveIssue(db *gorm.DB, issue Issue)
- func SaveIssues(db *gorm.DB, issues []Issue)
- type Creator
- type Episode
- type EpisodeArtist
- type EpisodeColourist
- type EpisodeLetterer
- type EpisodeWriter
- type Issue
- type Publication
- type Series
- type Suggestion
- type SuggestionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplySuggestion ¶
func ApplySuggestion(db *gorm.DB, suggestion Suggestion)
ApplySuggestion updates the database in db.DB in line with the instructions in the suggestion. It should take the suggestion.From value and find a Series object with that as a title. Then find a series with suggestion.To as a title. All episodes connected to the first should be updated to point to the second series. The first series should then be deleted.
func SaveIssues ¶
Types ¶
type Episode ¶
type Episode struct { gorm.Model Title string Part int `gorm:"CHECK:part >= 0"` IssueID uint Issue Issue SeriesID uint Series Series PageFrom int PageThru int Script []*Creator `gorm:"many2many:episode_writers"` Art []*Creator `gorm:"many2many:episode_artists"` Colours []*Creator `gorm:"many2many:episode_colourists"` Letters []*Creator `gorm:"many2many:episode_letterers"` }
type EpisodeArtist ¶
type EpisodeColourist ¶
type EpisodeLetterer ¶
type EpisodeWriter ¶
type Publication ¶
type Suggestion ¶
type Suggestion struct { From string To string Type SuggestionType }
func GetEpisodeTitleRenameSuggestions ¶
func GetEpisodeTitleRenameSuggestions(db *gorm.DB, knownTitles []string) []Suggestion
func GetSeriesTitleRenameSuggestions ¶
func GetSeriesTitleRenameSuggestions(db *gorm.DB, knownTitles []string) []Suggestion
type SuggestionType ¶
type SuggestionType int64
const ( SeriesTitle SuggestionType = iota EpisodeTitle )
Click to show internal directories.
Click to hide internal directories.