Monday, 2 January 2017

Is this too unorganized/messy?

// Dependencies var mongoose = require('mongoose'); // Schema var ProductSchema = new mongoose.Schema({ createdBy: { type: String }, imageURL:{ type: Array } productName:{ type: String }, productDescription:{ type: String } price: { type: Number }, colors:{ available:{type: Array}, unavailable:{type: Array} }, sizes:{ available:{type:Array}, unavailable:{type:Array} }, custom:{ type: Boolean }, sku: { type: String } likedBy:{ type: Array }, createdAt:{ type:Date }, updatedAt:{ type:Date } }); // Return model module.exports = mongoose.model('Product', ProductSchema);

Submitted January 02, 2017 at 09:06AM by farhansyed7911

No comments:

Post a Comment