match.js 396 B

12345678910111213141516
  1. import mongoose from 'mongoose'
  2. const MatchSchema = new mongoose.Schema({
  3. _created: Date,
  4. idString: String,
  5. date: Date,
  6. category: String,
  7. player1: { type: mongoose.Schema.Types.ObjectId, ref: 'Player' },
  8. player2: { type: mongoose.Schema.Types.ObjectId, ref: 'Player' },
  9. result: String,
  10. doubles: Boolean
  11. })
  12. const Match = mongoose.model('Match', MatchSchema)
  13. export default Match