1 | <?php |
||
29 | class Card extends RelationalEntity { |
||
30 | |||
31 | protected $title; |
||
32 | protected $description; |
||
33 | protected $descriptionPrev; |
||
34 | protected $stackId; |
||
35 | protected $type; |
||
36 | protected $lastModified; |
||
37 | protected $lastEditor; |
||
38 | protected $createdAt; |
||
39 | protected $labels; |
||
40 | protected $assignedUsers; |
||
41 | protected $attachments; |
||
42 | protected $attachmentCount; |
||
43 | protected $owner; |
||
44 | protected $order; |
||
45 | protected $archived = false; |
||
46 | protected $duedate; |
||
47 | protected $notified = false; |
||
48 | protected $deletedAt = 0; |
||
49 | protected $commentsUnread = 0; |
||
50 | |||
51 | private $databaseType = 'sqlite'; |
||
52 | |||
53 | const DUEDATE_FUTURE = 0; |
||
54 | const DUEDATE_NEXT = 1; |
||
55 | const DUEDATE_NOW = 2; |
||
56 | const DUEDATE_OVERDUE = 3; |
||
57 | |||
58 | public function __construct() { |
||
59 | $this->addType('id', 'integer'); |
||
60 | $this->addType('stackId', 'integer'); |
||
61 | $this->addType('order', 'integer'); |
||
62 | $this->addType('lastModified', 'integer'); |
||
63 | $this->addType('createdAt', 'integer'); |
||
64 | $this->addType('archived', 'boolean'); |
||
65 | $this->addType('notified', 'boolean'); |
||
66 | $this->addType('deletedAt', 'integer'); |
||
67 | $this->addRelation('labels'); |
||
68 | $this->addRelation('assignedUsers'); |
||
69 | $this->addRelation('attachments'); |
||
70 | $this->addRelation('attachmentCount'); |
||
71 | $this->addRelation('participants'); |
||
72 | $this->addRelation('commentsUnread'); |
||
73 | $this->addResolvable('owner'); |
||
74 | } |
||
75 | |||
76 | public function setDatabaseType($type) { |
||
77 | $this->databaseType = $type; |
||
78 | } |
||
79 | |||
80 | public function getDuedate($isoFormat = false) { |
||
90 | |||
91 | public function jsonSerialize() { |
||
92 | $json = parent::jsonSerialize(); |
||
122 | |||
123 | public function getCalendarObject(): VCalendar { |
||
134 | |||
135 | } |
||
136 |