const mongoose = require('../db/connect')

const { Schema } = mongoose

const crmContactSchema = new Schema({
    companyId: {
        type: String,
        required: true,
    },
    crm: {
        type: mongoose.Schema.ObjectId,
        ref: 'crm',
        required: true
    },
    crmBaseURL: {
        type: String,
        required: true,
    },
    contactId: {
        type: String,
        required: true,
    },
    phone: {
        type: String,
        required: true,
    }
}, { timestamps: true })

const CRM_Contact = mongoose.model('CRM_Contact', crmContactSchema)

module.exports = CRM_Contact
