- 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:
@@ -358,13 +358,27 @@ UserSchema.statics.getUsersListByParams = function (params) {
|
||||
* @returns {Object} Object -> `{ rows, count }`
|
||||
*/
|
||||
|
||||
UserSchema.statics.getFieldsForSearch = function () {
|
||||
return ['name', 'surname', 'email']
|
||||
};
|
||||
|
||||
UserSchema.statics.executeQueryTable = function (idapp, params) {
|
||||
params.fieldsearch = this.getFieldsForSearch();
|
||||
return tools.executeQueryTable(this, idapp, params);
|
||||
};
|
||||
|
||||
if (tools.INITDB_FIRSTIME) {
|
||||
console.log(' createIndex User Index...');
|
||||
// UserSchema.index({ username: 'text', name: 'text', surname: 'text', email: 'text' });
|
||||
// UserSchema.index({ name: 'name' });
|
||||
// UserSchema.index({ name: 1 });
|
||||
// UserSchema.index({ surname: 1 });
|
||||
}
|
||||
|
||||
const User = mongoose.model('User', UserSchema);
|
||||
|
||||
|
||||
|
||||
class Hero {
|
||||
constructor(name, level) {
|
||||
this.name = name;
|
||||
|
||||
Reference in New Issue
Block a user