2024-09-24 06:17:11 -04:00
|
|
|
package model
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"go.mongodb.org/mongo-driver/bson/primitive"
|
|
|
|
)
|
|
|
|
|
|
|
|
type GameInfo struct {
|
2024-12-22 11:28:55 -05:00
|
|
|
ID primitive.ObjectID `json:"id" bson:"_id"`
|
|
|
|
Name string `json:"name" bson:"name"`
|
|
|
|
Description string `json:"description" bson:"description"`
|
|
|
|
Aliases []string `json:"aliases" bson:"aliases"`
|
|
|
|
Developers []string `json:"developers" bson:"developers"`
|
|
|
|
Publishers []string `json:"publishers" bson:"publishers"`
|
|
|
|
IGDBID int `json:"igdb_id" bson:"igdb_id"`
|
|
|
|
SteamID int `json:"steam_id" bson:"steam_id"`
|
|
|
|
Cover string `json:"cover" bson:"cover"`
|
|
|
|
Languages []string `json:"languages" bson:"languages"`
|
|
|
|
Screenshots []string `json:"screenshots" bson:"screenshots"`
|
|
|
|
GameIDs []primitive.ObjectID `json:"game_ids" bson:"games"`
|
|
|
|
Games []*GameItem `json:"games" bson:"-"`
|
|
|
|
CreatedAt time.Time `json:"created_at" bson:"created_at"`
|
|
|
|
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
|
|
|
|
FirstReleaseDate time.Time `json:"first_release_date" bson:"first_release_date"`
|
|
|
|
GameEngines []string `json:"game_engines" bson:"game_engines"`
|
|
|
|
GameModes []string `json:"game_modes" bson:"game_modes"`
|
|
|
|
Genres []string `json:"genres" bson:"genres"`
|
|
|
|
Themes []string `json:"themes" bson:"themes"`
|
|
|
|
Platforms []string `json:"platforms" bson:"platforms"`
|
|
|
|
PlayerPerspectives []string `json:"player_perspectives" bson:"player_perspectives"`
|
|
|
|
SimilarGames []int `json:"similar_games" bson:"similar_games"`
|
|
|
|
Videos []string `json:"videos" bson:"videos"`
|
|
|
|
Websites []string `json:"websites" bson:"websites"`
|
|
|
|
Collections []GameCollection `json:"collections" bson:"collections"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type GameCollection struct {
|
|
|
|
Games []int `json:"games"`
|
|
|
|
Name string `json:"name"`
|
2024-09-24 06:17:11 -04:00
|
|
|
}
|
|
|
|
|
2024-11-16 00:48:48 -05:00
|
|
|
type GameItem struct {
|
2024-09-24 06:17:11 -04:00
|
|
|
ID primitive.ObjectID `json:"id" bson:"_id"`
|
|
|
|
Name string `json:"speculative_name" bson:"name"`
|
|
|
|
RawName string `json:"raw_name,omitempty" bson:"raw_name"`
|
|
|
|
Download string `json:"download_link,omitempty" bson:"download"`
|
|
|
|
Size string `json:"size,omitempty" bson:"size"`
|
|
|
|
Url string `json:"url" bson:"url"`
|
|
|
|
Password string `json:"password,omitempty" bson:"password"`
|
|
|
|
Author string `json:"author,omitempty" bson:"author"`
|
2024-12-21 11:37:00 -05:00
|
|
|
Platform string `json:"platform,omitempty" bson:"platform"`
|
2024-09-24 06:17:11 -04:00
|
|
|
UpdateFlag string `json:"-" bson:"update_flag,omitempty"`
|
|
|
|
CreatedAt time.Time `json:"created_at" bson:"created_at"`
|
|
|
|
UpdatedAt time.Time `json:"updated_at" bson:"updated_at"`
|
|
|
|
}
|