import { Task } from './task.model' ; export class Column { public tasks : Task [ ] ; constructor ( public id = 0 , public name = '' , public position = 0 , public board_id = 0 , public task_limit = 0 , ownTask = [ ] ) { this . tasks = [ ] ; ownTask . forEach ( ( task ) => { this . tasks . push ( new Task ( + task . id , task . title , task . description , task . color , task . due_date , + task . points , + task . position , + task . column_id , task . ownComment || task . comments , task . ownAttachment || task . attachments , task . sharedUser || task . assignees , task . sharedCategory || task . categories ) ) ; } ) ; } hasTaskLimit ( ) { return this . task_limit > 0 ; } }