Add team model and basic team endpoints
This commit is contained in:
25
app/models/Team.model.js
Normal file
25
app/models/Team.model.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const { Model } = require('flitter-orm')
|
||||
|
||||
/*
|
||||
* Team Model
|
||||
* -------------------------------------------------------------
|
||||
*/
|
||||
class Team extends Model {
|
||||
static get services() {
|
||||
return [...super.services, 'output']
|
||||
}
|
||||
|
||||
/*
|
||||
* Define the flitter-orm schema of the model.
|
||||
*/
|
||||
static get schema() {
|
||||
return {
|
||||
user_id: String,
|
||||
team_name: String,
|
||||
team_num: Number,
|
||||
player_ids: [String],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = exports = Team
|
||||
Reference in New Issue
Block a user