Schemas I think
This commit is contained in:
@@ -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 = Highscore;
|
||||
|
||||
Reference in New Issue
Block a user