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

33 lines
625 B
JavaScript
Raw Normal View History

2024-07-19 18:48:34 +00:00
const mongoose = require('../db/connect')
const { Schema } = mongoose
const crmTicketSchema = new Schema({
companyId: {
type: String,
required: true,
},
crm: {
type: mongoose.Schema.ObjectId,
ref: 'crm',
required: true
},
2024-07-19 18:48:34 +00:00
ticketId: {
type: String,
required: true,
},
ticketId2: {
type: String,
},
2024-07-19 18:48:34 +00:00
contact: {
type: mongoose.Schema.ObjectId,
ref: 'contact',
required: true
},
}, { timestamps: true })
2024-07-19 18:48:34 +00:00
const CRM_Ticket = mongoose.model('CRM_Ticket', crmTicketSchema)
module.exports = CRM_Ticket