{"size": 1133, "ext": "js", "max_stars_repo_path": "invoice/models/category.js", "max_stars_repo_name": "IgorChugurov/gmallupdate", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "invoice/models/category.js", "max_issues_repo_name": "IgorChugurov/gmallupdate", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "invoice/models/category.js", "max_forks_repo_name": "IgorChugurov/gmallupdate", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 17.703125, "max_line_length": 59, "alphanum_fraction": 0.5631067961}
'use strict';
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;
/**
 * User Schema
 */
var CategorySchema = new Schema({
  name: {
      ua:{type : String, default : '', trim : true},
      ru:{type : String, default : '', trim : true},
      en:{type : String, default : '', trim : true}

  },
  img : String,
  desc : {
      ua:{type : String, default : ''},
      ru:{type : String, default : ''},
      en:{type : String, default : ''}
  },
    brands: [{type : Schema.ObjectId, ref : 'Brand'}],
    filters: [{type : Schema.ObjectId, ref : 'FilterNew'}],
    mainFilter:{type : Schema.ObjectId, ref : 'FilterNew'},
    section: {type : Schema.ObjectId, ref : 'Category'},
  index: Number
});

/**
 * Virtuals
 */

/**
 * Pre-save hook
 */
/*
GroupsSchema

  .pre('save', function(next) {

      next();
  });
*/

/**
 * Methods
 */
CategorySchema.methods = {
  /**
   * Authenticate - check if the passwords are the same
   *
   * @param {String} plainText
   * @return {Boolean}
   * @api public
   */
  test: function(plainText) {
    return plainText;
  }

};

mongoose.model('Category', CategorySchema);



