Skip to content

Instantly share code, notes, and snippets.

@ellerrs
Last active December 13, 2015 23:09
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ellerrs/4989962 to your computer and use it in GitHub Desktop.
Save ellerrs/4989962 to your computer and use it in GitHub Desktop.
proposed product schema
var ProductSchema = new Schema({
categoryId: String
, department: String
, ean: String
, model: String
, weight: String
, dimensions: {
height: String
, width: String
, length: String
}
, reviews: [{
author: String
, title: String
, rating: String
, createdAt: Date
, updatedAt: Date
, text: String
, helpfulCount: Number
, comments: [{
author: String
, createdAt: Date
, updatedAt: Date
, text: String
}]
}]
, category: String
, imagesCount: Number
, images: [{ type: String }]
, features: []
, name: String
, description: String
, createdAt: { type: Date }
, updatedAt: { type: Date }
, price: String
, upc: String
, brand: String
, mpn: String
, manufacturer: String
, siteDetails: [{
sku: String
, name: String
, salesRank: String
, url: String
}]
})
@ellerrs
Copy link
Author

ellerrs commented Feb 19, 2013

For the iPod example, those would be separate products (sku). This should hold true for items of different color as well, until we get to clothing. I added in the features object (but left it very wild-west for now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment