Rakshitjan commited on
Commit
896bc2c
·
verified ·
1 Parent(s): 306d572

Update models.js

Browse files
Files changed (1) hide show
  1. models.js +10 -1
models.js CHANGED
@@ -316,9 +316,18 @@ const fileSchema = new mongoose.Schema({
316
  uploaded_by: String
317
  });
318
 
 
 
 
 
 
 
 
 
 
319
  const Admin = mongoose.model('Admin', adminSchema);
320
  const Agent = mongoose.model('Agent', agentSchema);
321
  const Case = mongoose.model('Case', caseSchema);
322
  const File = mongoose.model('File', fileSchema);
323
 
324
- module.exports = { connectDB, Admin, Agent, Case, File };
 
316
  uploaded_by: String
317
  });
318
 
319
+ const caseCreationWebhookSchema = new mongoose.Schema({
320
+ webhook_id: { type: String, required: true, unique: true },
321
+ request_data: { type: mongoose.Schema.Types.Mixed, required: true },
322
+ received_at: { type: Date, default: Date.now },
323
+ source_ip: String,
324
+ user_agent: String
325
+ });
326
+
327
+ const CaseCreationWebhook = mongoose.model('CaseCreationWebhook', caseCreationWebhookSchema);
328
  const Admin = mongoose.model('Admin', adminSchema);
329
  const Agent = mongoose.model('Agent', agentSchema);
330
  const Case = mongoose.model('Case', caseSchema);
331
  const File = mongoose.model('File', fileSchema);
332
 
333
+ module.exports = { connectDB, Admin, Agent, Case, File, CaseCreationWebhook };