2019-11-24 14:16:24 +01:00
|
|
|
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)
|
2020-01-30 21:49:00 +01:00
|
|
|
this.created = new Date(this.created * 1000)
|
2019-11-24 14:16:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
defaults() {
|
|
|
|
return {
|
|
|
|
id: 0,
|
|
|
|
task_id: 0,
|
|
|
|
file: FileModel,
|
|
|
|
created_by: UserModel,
|
|
|
|
created: 0,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|