node-raspberry-server/statusSchema.js
2019-01-12 15:03:08 +01:00

18 lines
347 B
JavaScript

const mongoose = require("mongoose");
const statusSchema = new mongoose.Schema(
{
status: [
{
value: String,
time: Date
}
],
device: {
type: mongoose.Schema.Types.ObjectId,
ref: "deviceSchema"
}
},
{ timestamps: true }
);
module.exports = mongoose.model("statusSchema", statusSchema);