text: var mongoose = require('mongoose');
  var Schema = mongoose.Schema;
  var ObjectId = Schema.ObjectId;
  var User = require('./user');
  
  var providerSchema = new Schema({
      name: {
          type: String,
          require: true,
          index: {
              unique: true,
              sparse: true
          },
          trim: true
      },
      email: {
          type: String,
          require: true,
          index: {
              unique: true,
              sparse: true
          },
          trim: true
      },
      password: {
          type: String,
          require: true
      },
      workinghours: { type: String, require: true },
      mobile: { type: String },
      address: { type: String },
      city: { type: String },
      zipcode: { type: Number },
      state: { type: String },
      country: String,
      user_id: { type: ObjectId, ref: 'User' },
      created_at: {
          type: Date,
          default: Date.now
      },
      updated_at: {
          type: Date,
          default: Date.now
      }
  });
  
  
  module.exports = mongoose.model('Provider', providerSchema);