const mongoose = require('mongoose');
const {mongooseConstantValues} = require('../apps/common/systemConstents')

const CategorySchema = mongoose.Schema({
  category:{
    type: String,
    require: true
  },
  created_on:{
    type: String
  },
  margin:{
    type:Number
  }, 
  margin_updated:{
    type:String
  },
  subCategory: {
    type: String
  },
  categoryImage: {
    type: Object
  },
  description: {
    type: String
  },
  keyword: {
    type: Array
  },
  updatedOn: {
    type : String
  },
  mobileFlag: {
    type: Number
  },
  websiteFlag: {
    type :Number
  },
  [mongooseConstantValues.PRODUCT_BROWSE_NODE]:{
    type: Number,
  }, 
  code: {
    type :Number
  },
  parent_id:{
    type:Object
  },
  level:{
    type :Number
  }
})

module.exports = mongoose.model('Category', CategorySchema);
