import mongoose from 'mongoose' const MatchSchema = new mongoose.Schema({ _created: Date, idString: String, date: Date, category: String, player1: { type: mongoose.Schema.Types.ObjectId, ref: 'Player' }, player2: { type: mongoose.Schema.Types.ObjectId, ref: 'Player' }, result: String, doubles: Boolean }) const Match = mongoose.model('Match', MatchSchema) export default Match