32 lines
611 B
JavaScript
32 lines
611 B
JavaScript
|
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
|