You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
480 B
JavaScript
28 lines
480 B
JavaScript
const { Schema, model } = require('mongoose')
|
|
|
|
const streams = new Schema({
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
event: {
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Event',
|
|
},
|
|
matches: [{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Matches',
|
|
}],
|
|
casters: [{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Casters',
|
|
}],
|
|
hosts: [{
|
|
type: Schema.Types.ObjectId,
|
|
ref: 'Hosts',
|
|
}],
|
|
})
|
|
|
|
const Stream = model('Streams', streams)
|
|
|
|
module.exports = Stream |