2020-11-05 02:31:52 +00:00
|
|
|
const AuthUser = require('flitter-auth/model/User')
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Auth user model. This inherits fields and methods from the default
|
|
|
|
* flitter-auth/model/User model, however you can override methods and
|
|
|
|
* properties here as you need.
|
|
|
|
*/
|
|
|
|
class User extends AuthUser {
|
2020-11-06 03:53:35 +00:00
|
|
|
static get services() {
|
|
|
|
return [...super.services, 'models']
|
|
|
|
}
|
|
|
|
|
2020-11-05 02:31:52 +00:00
|
|
|
static get schema() {
|
|
|
|
return {...super.schema, ...{
|
|
|
|
// other schema fields here
|
|
|
|
}}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Other members and methods here
|
2020-11-06 03:53:35 +00:00
|
|
|
async team() {
|
|
|
|
const Team = this.models.get('Team')
|
|
|
|
return Team.getForUser(this)
|
|
|
|
}
|
2020-11-05 02:31:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = exports = User
|