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)
|
2020-04-12 23:54:46 +02:00
|
|
|
this.createdBy = new UserModel(this.createdBy)
|
2019-11-24 14:16:24 +01:00
|
|
|
this.file = new FileModel(this.file)
|
2020-02-08 14:16:06 +01:00
|
|
|
this.created = new Date(this.created)
|
2019-11-24 14:16:24 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
defaults() {
|
|
|
|
return {
|
|
|
|
id: 0,
|
2020-04-12 23:54:46 +02:00
|
|
|
taskId: 0,
|
2019-11-24 14:16:24 +01:00
|
|
|
file: FileModel,
|
2020-04-12 23:54:46 +02:00
|
|
|
createdBy: UserModel,
|
2020-02-08 14:16:06 +01:00
|
|
|
created: null,
|
2019-11-24 14:16:24 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|