mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-12 16:57:39 -05:00
some of the backend is working
This commit is contained in:
@@ -26,4 +26,5 @@ var callSchema = mongoose.Schema({
|
||||
});
|
||||
|
||||
|
||||
module.exports = mongoose.model('Call', callSchema);
|
||||
exports.callSchema = callSchema;
|
||||
exports.callModel = mongoose.model('Call', callSchema);
|
||||
|
||||
19
backend/models/event.js
Normal file
19
backend/models/event.js
Normal file
@@ -0,0 +1,19 @@
|
||||
var mongoose = require('mongoose');
|
||||
var {callSchema} = require('./call');
|
||||
console.log(callSchema)
|
||||
|
||||
var groupSchema = mongoose.Schema({
|
||||
title: String,
|
||||
description: String,
|
||||
expireTime: Number,
|
||||
startTime: Number,
|
||||
endTime: Number,
|
||||
shortNames: [String],
|
||||
calls: [callSchema]
|
||||
},
|
||||
{
|
||||
timestamps: true
|
||||
});
|
||||
|
||||
|
||||
module.exports = mongoose.model('Event', groupSchema);
|
||||
Reference in New Issue
Block a user