<commit_before>var mongoose   = require('mongoose');
var Schema     = mongoose.Schema;
var User       = require('./user');

var FashionSchema = Schema({
  name : {type:String, index:true},
  stock: {type:Number},
  category: {type: String},
  brands: {type: String},
  description:{ type:String},
  sizes:{type:String},
  user: [{type:Schema.Types.ObjectId, ref:User}]
});

module.exports = mongoose.model('Fashion', FashionSchema);<commit_msg>change category field to reference object id of category schema<commit_after>var mongoose   = require('mongoose');
var Schema     = mongoose.Schema;
var User       = require('./user');
var Category   = require('./category');

var FashionSchema = Schema({
  name : {type:String, index:true},
  stock: {type:Number},
  category: [{type: Schema.Types.ObjectId, ref:Category}],
  brands: {type: String},
  description:{ type:String},
  sizes:{type:String},
  user: [{type:Schema.Types.ObjectId, ref:User}]
});

module.exports = mongoose.model('Fashion', FashionSchema);
{'fraction_non_alphanumeric': 0.16650148662041625, 'fraction_numerical': 0.0, 'mean_word_length': 5.047904191616767, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '870261', 'n_tokens_mistral': 309, 'n_tokens_neox': 316, 'n_words': 76}