var viewModel = AnimeDataFirebase(collection: "s1")
//viewModel keys: general, files, media
let general = viewModel["general"]
/*general keys:
engTitle: String
jpnTitle: String
episodes: Int
Number of episodes in a season
broadcast: String
Day xx:xx(time zone)
premiere: String
Season year
rating: String
ex. PG-13
categoryStatus: String
isFavorite: Bool
isRecommended: Bool
*/
let files = viewModel["files"]
/*file keys:
boxImage: String
file path for the box image
splashImage: String
file path for the splash image
*/
let media = viewModel["media"]
/*media keys
episodes: [String: mediaContent]
Key (episode numbers), value (mediaContent object)
movies: [String: mediaContent]
Key (movie numbers), value (mediaContent object)
*/
/*mediaContent methods
air_day: String
day of the week when the media airs
air_time: String
xx:xx(time zone)
description: String
description of the current episode
name_eng: String
name_jp: String
recap: String
a recap of the show until the current episode
*/
Path convention
animes/[auto-document id]/[season(sx)/movie(mx)]
Collections
animes/[auto-document id]
Field | Info |
---|---|
title | String: title of series |
animes/[auto-document id]/[season(sx)/movie(mx)]/files
Field | Info |
---|---|
box_image | String: path of box image |
splash_image | String: path of splash image |
doc_id_anime | String: the doc id for that anime |
animes/[auto-document id]/[season(sx)/movie(mx)]/general
Field | Type | Info |
---|---|---|
broadcast | String | “Week 24:00(time zone)” format, time in 24hrs |
category_status | String | “Watching”, “Completed”, “Plan to Watch”, “Dropped” |
description | String | Description of the current season of the show/movie |
title_eng | String | English title of media |
title_jp | String | Japanese title of media |
episodes | Int | Number of episodes in show/movie |
isFavorite | Bool | Show if favorite/not favorite |
isRecommended | Bool | Not implemented yet. Intended to show recommendations to users in the future |
premiere | String | “Season ##” format |
rating | String | “XX-##” format |