Moved middleware/ & schemas/ into api/.

This commit is contained in:
2020-11-24 23:34:13 +01:00
parent 036f6ea499
commit 236c07f3d0
13 changed files with 0 additions and 0 deletions

18
api/schemas/Highscore.js Normal file
View File

@@ -0,0 +1,18 @@
const mongoose = require("mongoose");
const Schema = mongoose.Schema;
const Highscore = new Schema({
name: String,
wins: [
{
color: String,
date: Date,
wine: {
type: Schema.Types.ObjectId,
ref: "Wine"
}
}
]
});
module.exports = mongoose.model("Highscore", Highscore);