Moved middleware/ & schemas/ into api/.
This commit is contained in:
18
api/schemas/Highscore.js
Normal file
18
api/schemas/Highscore.js
Normal 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);
|
||||
Reference in New Issue
Block a user