Separeted Finishes from TeamFinishes.

This commit is contained in:
BurnyLlama 2021-09-29 20:53:24 +02:00
parent b2e9827a5d
commit 450f243797
2 changed files with 11 additions and 1 deletions

View File

@ -4,7 +4,7 @@ const Finish = new mongoose.Schema({
map: { type: mongoose.Schema.ObjectId, ref: 'Level' }, map: { type: mongoose.Schema.ObjectId, ref: 'Level' },
time: Number, time: Number,
time: Date, time: Date,
players: [{ type: mongoose.Schema.ObjectId, ref: 'Player' }] player: { type: mongoose.Schema.ObjectId, ref: 'Player' }
}) })
export default mongoose.model("Finish", Finish) export default mongoose.model("Finish", Finish)

10
schemas/TeamFinish.js Normal file
View File

@ -0,0 +1,10 @@
import mongoose from 'mongoose'
const TeamFinish = new mongoose.Schema({
map: { type: mongoose.Schema.ObjectId, ref: 'Level' },
time: Number,
time: Date,
players: [{ type: mongoose.Schema.ObjectId, ref: 'Player' }]
})
export default mongoose.model("TeamFinish", TeamFinish)