This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/models/attachment.js
kolaente 161f853361
All checks were successful
continuous-integration/drone/push Build is passing
Make sure to use date objects everywhere where dealing with dates
2020-02-08 14:16:06 +01:00

23 lines
460 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.created_by = new UserModel(this.created_by)
this.file = new FileModel(this.file)
this.created = new Date(this.created)
}
defaults() {
return {
id: 0,
task_id: 0,
file: FileModel,
created_by: UserModel,
created: null,
}
}
}