raw

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2021 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 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.

func (Anime) TableName

func (a Anime) TableName() string

TableName to get table name.

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.

func (AnimeStaff) TableName

func (as AnimeStaff) TableName() string

TableName to get table name.

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.

func (Character) TableName

func (c Character) TableName() string

TableName to get table name.

type EmptyID

type EmptyID struct {
	Type string `gorm:"primary_key;type:varchar"`
	ID   int    `gorm:"primary_key"`
}

EmptyID is model for empty_id table containing empty MyAnimeList entry id.

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.

func (Genre) TableName

func (g Genre) TableName() string

TableName to get table name.

type Language

type Language struct {
	ID       int    `gorm:"primary_key"`
	Language string `gorm:"type:varchar"`
}

Language is model for language table containing voice actor language constant values.

func (Language) TableName

func (l Language) TableName() string

TableName to get table name.

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.

func (Manga) TableName

func (m Manga) TableName() string

TableName to get table name.

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

type MangaMagazine struct {
	MangaID    int `gorm:"primary_key"`
	MagazineID int `gorm:"primary_key"`
}

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.

func (MediaGenre) TableName

func (mg MediaGenre) TableName() string

TableName to get table name.

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.

func (People) TableName

func (p People) TableName() string

TableName to get table name.

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

type Position struct {
	ID       int    `gorm:"primary_key"`
	Position string `gorm:"type:varchar"`
}

Position is model for position table containing anime staff position constant values.

func (Position) TableName

func (p Position) TableName() string

TableName to get table name.

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.

func (Rating) TableName

func (r Rating) TableName() string

TableName to get table name.

type Related struct {
	ID      int    `gorm:"primary_key"`
	Related string `gorm:"type:varchar"`
}

Related is model for related table containing anime & manga related type constant values.

func (Related) TableName

func (r Related) TableName() string

TableName to get table name.

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.

func (Song) TableName

func (s Song) TableName() string

TableName to get table name.

type Source

type Source struct {
	ID     int    `gorm:"primary_key"`
	Source string `gorm:"type:varchar"`
}

Source is model for anime_source table containing anime source constant values.

func (Source) TableName

func (s Source) TableName() string

TableName to get table name.

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.

func (Stats) TableName

func (s Stats) TableName() string

TableName to get table name.

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.

func (Status) TableName

func (s Status) TableName() string

TableName to get table name.

type Type

type Type struct {
	ID   int    `gorm:"primary_key"`
	Type string `gorm:"primary_key;type:varchar"` // anime/manga
	Name string `gorm:"type:varchar"`
}

Type is model for media_type table containing anime & manga type constant value.

func (Type) TableName

func (t Type) TableName() string

TableName to get table name.

Jump to

Keyboard shortcuts

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