
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/440 Co-authored-by: konrad <konrad@kola-entertainments.de> Co-committed-by: konrad <konrad@kola-entertainments.de>
30 lines
570 B
JavaScript
30 lines
570 B
JavaScript
import AbstractModel from './abstractModel'
|
|
import UserModel from './user'
|
|
import TaskModel from './task'
|
|
|
|
export default class BucketModel extends AbstractModel {
|
|
constructor(bucket) {
|
|
super(bucket)
|
|
|
|
this.tasks = this.tasks.map(t => new TaskModel(t))
|
|
|
|
this.createdBy = new UserModel(this.createdBy)
|
|
this.created = new Date(this.created)
|
|
this.updated = new Date(this.updated)
|
|
}
|
|
|
|
defaults() {
|
|
return {
|
|
id: 0,
|
|
title: '',
|
|
listId: 0,
|
|
limit: 0,
|
|
tasks: [],
|
|
isDoneBucket: false,
|
|
|
|
createdBy: null,
|
|
created: null,
|
|
updated: null,
|
|
}
|
|
}
|
|
} |