- Added TablesList page
- Added Insert Record empty
This commit is contained in:
63
server/models/operator.js
Normal file
63
server/models/operator.js
Normal file
@@ -0,0 +1,63 @@
|
||||
const mongoose = require('mongoose');
|
||||
const Schema = mongoose.Schema;
|
||||
|
||||
const tools = require('../tools/general');
|
||||
|
||||
mongoose.Promise = global.Promise;
|
||||
mongoose.level = "F";
|
||||
|
||||
|
||||
// Resolving error Unknown modifier: $pushAll
|
||||
mongoose.plugin(schema => {
|
||||
schema.options.usePushEach = true
|
||||
});
|
||||
|
||||
const OperatorSchema = new Schema({
|
||||
idapp: {
|
||||
type: String,
|
||||
},
|
||||
username: {
|
||||
type: String,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
},
|
||||
surname: {
|
||||
type: String,
|
||||
},
|
||||
email: {
|
||||
type: String,
|
||||
},
|
||||
cell: {
|
||||
type: String,
|
||||
},
|
||||
webpage: {
|
||||
type: String,
|
||||
},
|
||||
img: {
|
||||
type: String,
|
||||
},
|
||||
skype: {
|
||||
type: String,
|
||||
},
|
||||
days_working: {
|
||||
type: String,
|
||||
},
|
||||
facebook: {
|
||||
type: String,
|
||||
},
|
||||
disciplines: {
|
||||
type: String,
|
||||
},
|
||||
offers: {
|
||||
type: String,
|
||||
},
|
||||
});
|
||||
|
||||
OperatorSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
return tools.executeQueryTable(this, idapp, params);
|
||||
};
|
||||
|
||||
const Operator = mongoose.model('Operator', OperatorSchema);
|
||||
|
||||
module.exports = { Operator };
|
||||
Reference in New Issue
Block a user