Your IP : 216.73.217.95


Current Path : /home/deltalab/PMS/buy-button-generator/models/mongoose/
Upload File :
Current File : //home/deltalab/PMS/buy-button-generator/models/mongoose/partner.js

const mongoose            = require('mongoose');

// SCHEMA ============================================
const PartnerSchema = new mongoose.Schema(
  {
    // Contact details
    companyName         : {
                          type: String,
                          required: true,
                        },
    description         : String,
    email               : String,
    address             : String,
    phone               : String,

    // Fiscal details
    vatNumber:    {type: String, required: true},

    active:       {type: Boolean, required: false, default: false},
    subscriptionPlanId:       { type: mongoose.Schema.Types.ObjectId, required: false, ref: 'SubscriptionPlan'}
  },
  {
    timestamps: true,
    versionKey: false
  }
);

// MODELS ============================================
const partnerModel = mongoose.model('Partner', PartnerSchema);

module.exports = {
  partnerModel,
  PartnerSchema
}