crm-api-template-generator/backend/models/CRM_Contact.js

32 lines
611 B
JavaScript
Raw Permalink Normal View History

2023-11-29 20:05:48 +00:00
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