DevvitIO / Lanflix

Netflix for your LAN
MIT License
7 stars 13 forks source link

Data Models #6

Open KenavR opened 7 years ago

KenavR commented 7 years ago

The suggested Models are based on information returned by the tvmaze API or themoviedb.org(maybe use something different, since we need to register the app) and some additional information needed for the app. In the future, it will maybe be extended by actors or viewing states.

// A seperate model so user can add new ones
ProductType {
  name: Required String
  description: String
}
// Genre or Category
Genre {
  name: Required Unique String
  description: String
}
Movie {
  name: Required Unique String
  type: ProductType
  genres: [Genre]
  videoPath: String
  language: String
  premierd: Date
  rating: Number
  imdbRating: Number
  image: String (base64 encoded or path to image)
  description: String
}
Series {
  name: Required Unique String
  type: ProductType
  genres: [Genre]
  rootPath: String
  language: String
  premierd: Date
  rating: Number
  imdbRating: Number
  image: String (base64 encoded or path to image)
  description: String
  episodes: [Episode]
}
// Part of Series
Episode {
  name: Required String
  season: Required Number
  number: Required Number //Episode Number
  premiered: Date
  videoPath: String
  image: String (base64 encoded or path to image)
  description: String
  // Maybe
  rating?: Number
  imdbRating?: Number
}
// User or Profile
User {
  name: Required String
}
KenavR commented 7 years ago

I updated the models with a first draft. Let me know if you think something is missing. I think "genre" is a better name over "category", but I am not sure if I thought about something different when I named it category.