Browse Source
Also change the order that socket gets initiated in index. It must be after DB conn.main
Haris Razis
4 years ago
4 changed files with 15 additions and 2 deletions
@ -0,0 +1,10 @@ |
|||||
|
const mongoose = require('mongoose'); |
||||
|
const {Schema} = mongoose; |
||||
|
|
||||
|
const AthleteSchema = new Schema({ |
||||
|
id: String, |
||||
|
name: String, |
||||
|
_trainer: {type: Schema.Types.ObjectId, ref: 'User'} |
||||
|
}); |
||||
|
|
||||
|
mongoose.model('Athlete', AthleteSchema); |
Loading…
Reference in new issue