vikunja-frontend/src/models/attachment.js

23 lines
456 B
JavaScript
Raw Normal View History

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