frontend/src/models/teamShareBase.js
konrad 4a413e7f3c Make all api fields snake_case (#105)
Change all snake/camelCase mix and match to camelCase everywhere

Fix conversion to not interfer with service interceptors

Add dynamic conversion between camelCase and snake_case to services

Co-authored-by: kolaente <k@knt.li>
Reviewed-on: vikunja/frontend#105
2020-04-12 21:54:46 +00:00

23 lines
475 B
JavaScript

import AbstractModel from './abstractModel'
/**
* This class is a base class for common team sharing model.
* It is extended in a way so it can be used for namespaces as well for lists.
*/
export default class TeamShareBaseModel extends AbstractModel {
constructor(data) {
super(data)
this.created = new Date(this.created)
this.updated = new Date(this.updated)
}
defaults() {
return {
teamId: 0,
right: 0,
created: null,
updated: null
}
}
}