start = new \DateTime('now'); $this->end = new \DateTime('now'); $this->end->modify('+1 month'); $this->endEstimated = clone $this->end; $this->createdAt = new \DateTimeImmutable('now'); $this->createdBy = new NullAccount(); $this->calendar = new Calendar(); $this->actualCosts = new FloatInt(); $this->actualEarnings = new FloatInt(); $this->budgetCosts = new FloatInt(); $this->budgetEarnings = new FloatInt(); } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'start' => $this->start, 'end' => $this->end, 'name' => $this->name, 'description' => $this->description, 'calendar' => $this->calendar, 'budgetCosts' => $this->budgetCosts, 'budgetEarnings' => $this->budgetEarnings, 'actualCosts' => $this->actualCosts, 'actualEarnings' => $this->actualEarnings, 'tasks' => $this->tasks, 'media' => $this->files, 'progress' => $this->progress, 'progressType' => $this->progressType, 'createdAt' => $this->createdAt, ]; } /** * {@inheritdoc} */ public function jsonSerialize() : mixed { return $this->toArray(); } use \Modules\Media\Models\MediaListTrait; use \Modules\Attribute\Models\AttributeHolderTrait; // @todo implement tags }