Archived
2

added user status and prediction user

This commit is contained in:
VLE2FE
2020-08-26 19:37:36 +02:00
parent efbf73032d
commit 597a8f3084
21 changed files with 477 additions and 80 deletions

View File

@ -7,7 +7,7 @@ const ModelSchema = new mongoose.Schema({
name: String,
url: String,
label: String
} ,{ _id : false })]
} ,{ _id : true })]
});
// changelog query helper

View File

@ -1,5 +1,6 @@
import mongoose from 'mongoose';
import db from '../db';
import ModelModel from './model';
const UserSchema = new mongoose.Schema({
name: {type: String, index: {unique: true}},
@ -8,7 +9,9 @@ const UserSchema = new mongoose.Schema({
key: String,
level: String,
location: String,
devices: [String]
devices: [String],
models: [{type: mongoose.Schema.Types.ObjectId, ref: ModelModel}],
status: String
});
// changelog query helper