Files
multiplayer-stickfigure-game/API/player.model.js
Johnathon Slightham 71017cc5b6 updated
2021-09-07 12:53:34 -04:00

22 lines
389 B
JavaScript

const mongoose = require('mongoose');
const Schema = mongoose.Schema;
// Define collection and schema for Post
let Player = new Schema({
name: {
type: String
},
session: {
type: String
},
colour: {
type: Number
},
score: {
type: Number
}
}, {
collection: 'players'
});
module.exports = mongoose.model('Player', Player);