2020-11-07 18:10:19 +00:00
|
|
|
const { Model } = require('flitter-orm')
|
2020-11-08 00:05:26 +00:00
|
|
|
/**
|
|
|
|
* Weekly Team Stat model
|
|
|
|
* ---------------------------------------------------------------------------
|
2020-11-08 18:34:50 +00:00
|
|
|
* A record containing the stats for a single team for a single lineup for a single week.
|
|
|
|
*
|
|
|
|
* @extends Model
|
2020-11-08 00:05:26 +00:00
|
|
|
*/
|
2020-11-07 18:10:19 +00:00
|
|
|
class WeeklyTeamStat extends Model {
|
|
|
|
static get services() {
|
|
|
|
return [...super.services, 'models']
|
|
|
|
}
|
|
|
|
|
2020-11-08 00:05:26 +00:00
|
|
|
/**
|
|
|
|
* defines the schema of the particular model
|
|
|
|
*/
|
2020-11-07 18:10:19 +00:00
|
|
|
static get schema() {
|
|
|
|
return {
|
|
|
|
team_id: String,
|
|
|
|
lineup_id: String,
|
|
|
|
week_num: Number,
|
|
|
|
player_ids: [String],
|
|
|
|
fantasy_points: Number,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = exports = WeeklyTeamStat
|