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
    }, 
    ticketId: {
        type: String,
        required: true,
    },
    contact: {
        type: mongoose.Schema.ObjectId,
        ref: 'contact',
        required: true
    },
}, { timestamps: true }) 


const CRM_Ticket = mongoose.model('CRM_Ticket', crmTicketSchema)

module.exports = CRM_Ticket