'use strict'; var mongoose = require('mongoose'); var Schema = mongoose.Schema; var informationSchema = { text: { shortDesc: { type: String }, fullDesc: { type: String }, application: { type: String }, actives: [ String ], ph: { type: String }, }, category: { _id: Schema.ObjectId, name: { type: String } } }; module.exports = mongoose.model('Product', mongoose.Schema({ name: { type: String, required: true }, imgUrl: { type: String }, thumbUrl: { type: String }, size: [ String ], ES: informationSchema, EN: informationSchema }))