Spaces:
Runtime error
Runtime error
pc 7
Browse files
src/database/models/glucosa.js
CHANGED
|
@@ -1,13 +1,16 @@
|
|
| 1 |
const mongoose = require("mongoose");
|
| 2 |
|
| 3 |
-
const glucosa = new mongoose.Schema(
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
-
const Glucosa = mongoose.model("
|
| 12 |
|
| 13 |
module.exports = Glucosa;
|
|
|
|
| 1 |
const mongoose = require("mongoose");
|
| 2 |
|
| 3 |
+
const glucosa = new mongoose.Schema(
|
| 4 |
+
{
|
| 5 |
+
glucosa: { type: Number, required: true },
|
| 6 |
+
ayuno: Boolean,
|
| 7 |
+
comentario: { type: String, default: null },
|
| 8 |
+
createdAt: { type: Date, default: Date.now },
|
| 9 |
+
iduser: String,
|
| 10 |
+
},
|
| 11 |
+
{ collation: "glucosa" }
|
| 12 |
+
);
|
| 13 |
|
| 14 |
+
const Glucosa = mongoose.model("Glucosa", glucosa);
|
| 15 |
|
| 16 |
module.exports = Glucosa;
|