- Permissions table (probably I'll change for others uses)

- Added CDateTime component (to save in the db)... in the component CGridTableRec and for CEventsCalendar
This commit is contained in:
Paolo Arena
2019-10-28 16:01:28 +01:00
parent 5307c04151
commit 93ccc73517
7 changed files with 142 additions and 11 deletions

View File

@@ -105,10 +105,20 @@ MyEventSchema.statics.findAllIdApp = function (idapp) {
};
MyEventSchema.statics.getFieldsForSearch = function () {
return ['short_tit', 'title', 'teacher', 'details']
};
MyEventSchema.statics.executeQueryTable = function (idapp, params) {
params.fieldsearch = this.getFieldsForSearch();
return tools.executeQueryTable(this, idapp, params);
};
if (tools.INITDB_FIRSTIME) {
// console.log(' createIndex MyEvent Index...');
// MyEventSchema.index({ short_tit: 'text', title: 'text', teacher: 'text', details: 'text' });
}
const MyEvent = mongoose.model('MyEvent', MyEventSchema);