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/bucket.js
kolaente a1e1fe4eb0
All checks were successful
continuous-integration/drone/push Build is passing
Add missing position property to list and bucket models
2021-07-28 22:46:33 +02:00

31 lines
586 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,
position: 0,
createdBy: null,
created: null,
updated: null,
}
}
}