model

package
v1.2.8 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MovieMetadataTableName = "movie_metadata"
	MovieReviewsTableName  = "movie_reviews"
)
View Source
const ActorMetadataTableName = "actor_metadata"

Variables

This section is empty.

Functions

This section is empty.

Types

type ActorInfo

type ActorInfo struct {
	ID           string         `json:"id" gorm:"primaryKey"`
	Name         string         `json:"name"`
	Provider     string         `json:"provider" gorm:"primaryKey"`
	Homepage     string         `json:"homepage"`
	Summary      string         `json:"summary"`
	Hobby        string         `json:"hobby"`
	Skill        string         `json:"skill"`
	BloodType    string         `json:"blood_type"`
	CupSize      string         `json:"cup_size"`
	Measurements string         `json:"measurements"`
	Nationality  string         `json:"nationality"`
	Height       int            `json:"height"`
	Aliases      pq.StringArray `json:"aliases" gorm:"type:text[]"`
	Images       pq.StringArray `json:"images" gorm:"type:text[]"`
	Birthday     datatypes.Date `json:"birthday"`
	DebutDate    datatypes.Date `json:"debut_date"`
	TimeTracker  `json:"-"`
}

func (*ActorInfo) TableName

func (*ActorInfo) TableName() string

func (*ActorInfo) ToSearchResult

func (a *ActorInfo) ToSearchResult() *ActorSearchResult

func (*ActorInfo) Valid

func (a *ActorInfo) Valid() bool

type ActorSearchResult

type ActorSearchResult struct {
	ID       string         `json:"id"`
	Name     string         `json:"name"`
	Provider string         `json:"provider"`
	Homepage string         `json:"homepage"`
	Aliases  pq.StringArray `json:"aliases,omitempty"`
	Images   pq.StringArray `json:"images"`
}

ActorSearchResult is a subset of ActorInfo.

func (*ActorSearchResult) Valid

func (a *ActorSearchResult) Valid() bool

type MovieInfo

type MovieInfo struct {
	ID       string `json:"id" gorm:"primaryKey"`
	Number   string `json:"number"`
	Title    string `json:"title"`
	Summary  string `json:"summary"`
	Provider string `json:"provider" gorm:"primaryKey"`
	Homepage string `json:"homepage"`

	Director string         `json:"director"`
	Actors   pq.StringArray `json:"actors" gorm:"type:text[]"`

	ThumbURL           string         `json:"thumb_url"`
	BigThumbURL        string         `json:"big_thumb_url"`
	CoverURL           string         `json:"cover_url"`
	BigCoverURL        string         `json:"big_cover_url"`
	PreviewVideoURL    string         `json:"preview_video_url"`
	PreviewVideoHLSURL string         `json:"preview_video_hls_url"`
	PreviewImages      pq.StringArray `json:"preview_images" gorm:"type:text[]"`

	Maker  string         `json:"maker"`
	Label  string         `json:"label"`
	Series string         `json:"series"`
	Genres pq.StringArray `json:"genres" gorm:"type:text[]"`
	Score  float64        `json:"score"`

	Runtime     int            `json:"runtime"`
	ReleaseDate datatypes.Date `json:"release_date"`

	TimeTracker `json:"-"`
}

func (*MovieInfo) TableName

func (*MovieInfo) TableName() string

func (*MovieInfo) ToSearchResult

func (m *MovieInfo) ToSearchResult() *MovieSearchResult

func (*MovieInfo) Valid

func (m *MovieInfo) Valid() bool

type MovieReviewDetail added in v1.2.1

type MovieReviewDetail struct {
	Title   string         `json:"title"`
	Author  string         `json:"author"`
	Comment string         `json:"comment"`
	Score   float64        `json:"score"`
	Date    datatypes.Date `json:"date"`
}

func (*MovieReviewDetail) Valid added in v1.2.1

func (m *MovieReviewDetail) Valid() bool

type MovieReviewInfo added in v1.2.0

type MovieReviewInfo struct {
	ID          string                                   `json:"id" gorm:"primaryKey"`
	Provider    string                                   `json:"provider" gorm:"primaryKey"`
	Reviews     datatypes.JSONType[[]*MovieReviewDetail] `json:"reviews"`
	TimeTracker `json:"-"`
}

func (*MovieReviewInfo) TableName added in v1.2.1

func (*MovieReviewInfo) TableName() string

func (*MovieReviewInfo) Valid added in v1.2.0

func (m *MovieReviewInfo) Valid() bool

type MovieSearchResult

type MovieSearchResult struct {
	ID          string         `json:"id"`
	Number      string         `json:"number"`
	Title       string         `json:"title"`
	Provider    string         `json:"provider"`
	Homepage    string         `json:"homepage"`
	ThumbURL    string         `json:"thumb_url"`
	CoverURL    string         `json:"cover_url"`
	Score       float64        `json:"score"`
	Actors      pq.StringArray `json:"actors,omitempty"`
	ReleaseDate datatypes.Date `json:"release_date"`
}

MovieSearchResult is a subset of MovieInfo.

func (*MovieSearchResult) Valid

func (m *MovieSearchResult) Valid() bool

type TimeTracker

type TimeTracker struct {
	CreatedAt time.Time
	UpdatedAt time.Time
}

Jump to

Keyboard shortcuts

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