const mongoose = require('mongoose');
var AutoIncrement = require('mongoose-sequence')(mongoose);

const CompanySchema = new mongoose.Schema({
 
  phone: {
    type: String,
    required: true
  },

   

  email: {
    type: String,
    required: true
  },



  name: {
    type: String,
    required: false
  },

country: String,

mainColor: String,

main_currency: [],

otherCurrencies: [],

logoPath: String,

setUpPaid: Boolean,

paymentMethod: String,

paymentMethodKey: String,

clients: [],

owner: String,

admins: [],

practice_countries: [],

isActive: Boolean,

isWarningNotified: Boolean,
accountNumber: Number,
dateToRenew: String,

 date: String

});

CompanySchema.plugin(AutoIncrement, {id:'order_seq',inc_field: 'accountNumber'});
const Company = mongoose.model('Company', CompanySchema);

module.exports = Company;
