Skip to content

Instantly share code, notes, and snippets.

@ellerrs
Last active Dec 13, 2015
Embed
What would you like to do?
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
}]
})
@bluetidepro
Copy link

bluetidepro commented Feb 19, 2013

How does reviews work into these? Is that a separate schema/call? What about coupons/offers? I also like how Semantics has a "features" object (a link to their schema: http://bluetide.pro/gVDk/5qEj1aBD). Can we have something like that? You may need to account for some form of "variation_id" so we can say "iPod", then have variations of like 1st gen, 2nd gen, etc. Or will those just be separate products? Can we get a "images_total" above images that is just a count of that object. Thoughts?

@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