Use typed IDs instead of plain strings

This commit is contained in:
2019-11-18 14:01:13 +09:00
parent e7c7e84334
commit a50a119e08
26 changed files with 75 additions and 44 deletions

View File

@ -10,13 +10,16 @@ import (
"github.com/akyoto/color"
)
// QuoteID represents a quote ID.
type QuoteID = ID
// Quote is a quote made by a character in an anime.
type Quote struct {
Text QuoteText `json:"text" editable:"true"`
CharacterID string `json:"characterId" editable:"true"`
AnimeID AnimeID `json:"animeId" editable:"true"`
EpisodeNumber int `json:"episode" editable:"true"`
Time int `json:"time" editable:"true"`
Text QuoteText `json:"text" editable:"true"`
CharacterID CharacterID `json:"characterId" editable:"true"`
AnimeID AnimeID `json:"animeId" editable:"true"`
EpisodeNumber int `json:"episode" editable:"true"`
Time int `json:"time" editable:"true"`
hasID
hasPosts