Documentation
¶
Index ¶
- type Anime
- type AnimeCharacter
- type AnimeProducer
- type AnimeStaff
- type Character
- type EmptyID
- type Genre
- type Language
- type Manga
- type MangaCharacter
- type MangaMagazine
- type MediaGenre
- type MediaRelated
- type People
- type PeopleManga
- type Position
- type ProducerMagazine
- type Rating
- type Related
- type Song
- type Source
- type Stats
- type StatsHistory
- type Status
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anime ¶
type Anime struct {
ID int `gorm:"primary_key"`
Title string `gorm:"type:varchar"`
TitleEnglish string `gorm:"type:varchar"`
TitleJapanese string `gorm:"type:varchar"`
TitleSynonym string `gorm:"type:varchar"`
ImageURL string `gorm:"type:varchar"`
VideoURL string `gorm:"type:varchar"`
Synopsis string `gorm:"type:varchar"`
Score float64 `gorm:"type:numeric"`
Voter int `gorm:"type:int"`
Rank int `gorm:"type:int"`
Popularity int `gorm:"type:int"`
Member int `gorm:"type:int"`
Favorite int `gorm:"type:int"`
AnimeTypeID int `gorm:"type:int"`
Episode int `gorm:"type:int"`
AnimeStatusID int `gorm:"type:int"`
StartYear int `gorm:"type:int"`
StartMonth int `gorm:"type:int"`
StartDay int `gorm:"type:int"`
EndYear int `gorm:"type:int"`
EndMonth int `gorm:"type:int"`
EndDay int `gorm:"type:int"`
AiringDay string `gorm:"type:varchar"`
AiringTime string `gorm:"type:varchar"`
Premiered string `gorm:"type:varchar"`
AnimeSourceID int `gorm:"type:int"`
Duration int `gorm:"type:int"`
AnimeRatingID int `gorm:"type:int"`
CreatedAt time.Time `gorm:"type:timestamp"`
UpdatedAt time.Time `gorm:"type:timestamp"`
}
Anime is model for anime table.
type AnimeCharacter ¶
type AnimeCharacter struct {
AnimeID int `gorm:"primary_key"`
CharacterID int `gorm:"primary_key"`
PeopleID int `gorm:"primary_key"`
Role string `gorm:"type:varchar"` // main/supporting
LanguageID int `gorm:"type:int"`
}
AnimeCharacter is model for anime_character table containing relation between anime, character, people (voice actor) and language.
func (AnimeCharacter) TableName ¶
func (ac AnimeCharacter) TableName() string
TableName to get table name.
type AnimeProducer ¶
type AnimeProducer struct {
AnimeID int `gorm:"primary_key"`
ProducerID int `gorm:"primary_key"`
IsLicensor bool `gorm:"primary_key;type:bool;default:false"`
IsStudio bool `gorm:"primary_key;type:bool;default:false"`
}
AnimeProducer is many-to-many relation model between anime and producer.
func (AnimeProducer) TableName ¶
func (ap AnimeProducer) TableName() string
TableName to get table name.
type AnimeStaff ¶
type AnimeStaff struct {
AnimeID int `gorm:"primary_key"`
PeopleID int `gorm:"primary_key"`
PositionID int `gorm:"primary_key"`
}
AnimeStaff is model for anime_staff table containing relation between anime, staff, and position.
type Character ¶
type Character struct {
ID int `gorm:"primary_key"`
Name string `gorm:"type:varchar"`
Nickname string `gorm:"type:varchar"`
JapaneseName string `gorm:"type:varchar"`
ImageURL string `gorm:"type:varchar"`
Favorite int `gorm:"type:int"`
About string `gorm:"type:varchar"`
CreatedAt time.Time `gorm:"type:timestamp"`
UpdatedAt time.Time `gorm:"type:timestamp"`
}
Character is model for character table.
type Genre ¶
type Genre struct {
ID int `gorm:"primary_key"`
Type string `gorm:"primary_key;type:varchar"` // anime/manga
Genre string `gorm:"type:varchar"`
}
Genre is model for genre table containing anime & manga complete genre list.
type Language ¶
Language is model for language table containing voice actor language constant values.
type Manga ¶
type Manga struct {
ID int `gorm:"primary_key"`
Title string `gorm:"type:varchar"`
TitleEnglish string `gorm:"type:varchar"`
TitleJapanese string `gorm:"type:varchar"`
TitleSynonym string `gorm:"type:varchar"`
ImageURL string `gorm:"type:varchar"`
Synopsis string `gorm:"type:varchar"`
Score float64 `gorm:"type:numeric"`
Voter int `gorm:"type:int"`
Rank int `gorm:"type:int"`
Popularity int `gorm:"type:int"`
Member int `gorm:"type:int"`
Favorite int `gorm:"type:int"`
MangaTypeID int `gorm:"type:int"`
Volume int `gorm:"type:int"`
Chapter int `gorm:"type:int"`
MangaStatusID int `gorm:"type:int"`
StartYear int `gorm:"type:int"`
StartMonth int `gorm:"type:int"`
StartDay int `gorm:"type:int"`
EndYear int `gorm:"type:int"`
EndMonth int `gorm:"type:int"`
EndDay int `gorm:"type:int"`
CreatedAt time.Time `gorm:"type:timestamp"`
UpdatedAt time.Time `gorm:"type:timestamp"`
}
Manga is model for manga table.
type MangaCharacter ¶
type MangaCharacter struct {
MangaID int `gorm:"primary_key"`
CharacterID int `gorm:"primary_key"`
Role string `gorm:"type:varchar"` // main/supporting
}
MangaCharacter is model for manga_character table containing manga and character relation.
func (MangaCharacter) TableName ¶
func (mc MangaCharacter) TableName() string
TableName to get table name.
type MangaMagazine ¶
MangaMagazine is model for manga_magazine table containing manga and magazine (serialization) relation.
func (MangaMagazine) TableName ¶
func (mm MangaMagazine) TableName() string
TableName to get table name.
type MediaGenre ¶
type MediaGenre struct {
Type string `gorm:"primary_key;type:varchar"` // anime/manga
MediaID int `gorm:"primary_key"`
GenreID int `gorm:"primary_key"`
}
MediaGenre is model for media_genre table containing relation between anime/manga and genre.
type MediaRelated ¶
type MediaRelated struct {
MediaID int `gorm:"primary_key"`
MediaType string `gorm:"primary_key;type:varchar"` // anime/manga
RelatedTypeID int `gorm:"primary_key"`
RelatedID int `gorm:"primary_key"`
RelatedType string `gorm:"primary_key;type:varchar"` // anime/manga
}
MediaRelated is model for media_related table containing relation between related anime & manga.
func (MediaRelated) TableName ¶
func (mr MediaRelated) TableName() string
TableName to get table name.
type People ¶
type People struct {
ID int `gorm:"primary_key"`
Name string `gorm:"type:varchar"`
GivenName string `gorm:"type:varchar"`
FamilyName string `gorm:"type:varchar"`
AlternativeName string `gorm:"type:varchar"`
ImageURL string `gorm:"type:varchar"`
BirthdayYear int `gorm:"type:int"`
BirthdayMonth int `gorm:"type:int"`
BirthdayDay int `gorm:"type:int"`
Website string `gorm:"type:varchar"`
Favorite int `gorm:"type:int"`
More string `gorm:"type:varchar"`
CreatedAt time.Time `gorm:"type:timestamp"`
UpdatedAt time.Time `gorm:"type:timestamp"`
}
People is model for people table.
type PeopleManga ¶
type PeopleManga struct {
PeopleID int `gorm:"primary_key"`
MangaID int `gorm:"primary_key"`
PositionID int `gorm:"primary_key"`
}
PeopleManga is model for people_manga table containing people (author) and manga relation.
func (PeopleManga) TableName ¶
func (pm PeopleManga) TableName() string
TableName to get table name.
type Position ¶
Position is model for position table containing anime staff position constant values.
type ProducerMagazine ¶
type ProducerMagazine struct {
ID int `gorm:"primary_key;"`
Type string `gorm:"primary_key;type:varchar"` // anime/manga
Name string `gorm:"type:varchar"`
}
ProducerMagazine is model for producer_magazine table containing all anime producers and manga magazines.
func (ProducerMagazine) TableName ¶
func (p ProducerMagazine) TableName() string
TableName to get table name.
type Rating ¶
type Rating struct {
ID int `gorm:"primary_key"`
Rating string `gorm:"type:varchar"`
Description string `gorm:"type:varchar"`
}
Rating is model for rating table containing anime rating constant values.
type Related ¶
Related is model for related table containing anime & manga related type constant values.
type Song ¶
type Song struct {
ID int `gorm:"primary_key"`
AnimeID int `gorm:"primary_key"`
Type int `gorm:"primary_key"` // 1=op, 2=ed
Song string `gorm:"type:varchar"`
}
Song is model for song table.
type Stats ¶
type Stats struct {
ID int `gorm:"primary_key"`
Type string `gorm:"primary_key;type:varchar"` // anime/manga
Current int `gorm:"type:int"`
Completed int `gorm:"type:int"`
OnHold int `gorm:"type:int"`
Dropped int `gorm:"type:int"`
Planned int `gorm:"type:int"`
Score1 int `gorm:"column:score_1"`
Score2 int `gorm:"column:score_2"`
Score3 int `gorm:"column:score_3"`
Score4 int `gorm:"column:score_4"`
Score5 int `gorm:"column:score_5"`
Score6 int `gorm:"column:score_6"`
Score7 int `gorm:"column:score_7"`
Score8 int `gorm:"column:score_8"`
Score9 int `gorm:"column:score_9"`
Score10 int `gorm:"column:score_10"`
}
Stats is model for stats table containing anime & manga progress count and score.
type StatsHistory ¶
type StatsHistory struct {
ID int `gorm:"primary_key"`
MediaID int `gorm:"primary_key"`
Type string `gorm:"primary_key;type:varchar"` // anime/manga
Score float64 `gorm:"type:numeric"`
Voter int `gorm:"type:int"`
Rank int `gorm:"type:int"`
Popularity int `gorm:"type:int"`
Member int `gorm:"type:int"`
Favorite int `gorm:"type:int"`
CreatedAt time.Time `gorm:"type:timestamp"`
}
StatsHistory is model for history of entries stats.
type Status ¶
type Status struct {
ID int `gorm:"primary_key"`
Type string `gorm:"primary_key;type:varchar"` // anime/manga
Name string `gorm:"type:varchar"`
}
Status is model for status table containing anime & manga status constant value.
Source Files
¶
- anime.go
- anime_character.go
- anime_producer.go
- anime_staff.go
- character.go
- empty_id.go
- genre.go
- language.go
- manga.go
- manga_character.go
- manga_magazine.go
- media_genre.go
- media_related.go
- people.go
- people_manga.go
- position.go
- producer_magazine.go
- rating.go
- related.go
- song.go
- source.go
- stats.go
- stats_history.go
- status.go
- type.go