4a413e7f3c
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: https://kolaente.dev/vikunja/frontend/pulls/105
22 lines
456 B
JavaScript
22 lines
456 B
JavaScript
import AbstractModel from './abstractModel'
|
|
import UserModel from './user'
|
|
import FileModel from './file'
|
|
|
|
export default class AttachmentModel extends AbstractModel {
|
|
constructor(data) {
|
|
super(data)
|
|
this.createdBy = new UserModel(this.createdBy)
|
|
this.file = new FileModel(this.file)
|
|
this.created = new Date(this.created)
|
|
}
|
|
|
|
defaults() {
|
|
return {
|
|
id: 0,
|
|
taskId: 0,
|
|
file: FileModel,
|
|
createdBy: UserModel,
|
|
created: null,
|
|
}
|
|
}
|
|
}
|