Skip to content
Neuco edited this page Feb 15, 2018 · 9 revisions

The APP itself consists on 3 main models.

User

{
  email: String, Required 
  password: String, Hashed 
  name: String, Required 
  surname: String, Required 
  dateOfBirth: String, Required 
  gender: Enum: [M, F] 
  library: Array of Book 
}

Author

{
  name: String, Required 
  surname: String, Required 
  dateOfBirth: String, Required 
  dateOfDeath: String 
  gender: Enum: [M, F] 
  nationality: String 
  language: String
  ocupation: String
  photo: File
  books: Array of Book

  quotes: [
    {
      quote: String
      user: String 
    }
  ],

  reviews: [
    {
      stars: Number
      comment: String
      user: String
    }
  ]
}

Book

{
  isbn: String, Required 
  title: String, Required 

  author: { 
    name: String, Required
    surname: String, Required 
  } 

  description: String 
  image: File 
  
  genre: Enum: ['No ficción', 'Novela', 'Poesía', 'Ensayo', 'Terror', 'Filosofía', 'Policial', 'Fantástico', 'Biografía', 'Autobiografía', 'Diario de viajes'], Required

  likes: Number

  quotes: [
    {
      quote: String
      user: String
    }
  ]

  reviews: [
    {
      stars: Number
      comment: String
      user: String
    }
  ]
}
Clone this wiki locally