createdAt = new \DateTime('now'); } /** * @return \DateTime * * @since 1.0.0 */ public function getCreatedAt() : \DateTime { return $this->createdAt ?? new \DateTime(); } /** * Get created by * * @return int|\phpOMS\Account\Account * * @since 1.0.0 */ public function getCreatedBy() { return $this->createdBy; } /** * Set created by * * @param mixed $id Created by * * @return void * * @since 1.0.0 */ public function setCreatedBy($id) : void { $this->createdBy = $id; } /** * Set description * * @param string $description Description * * @return void * * @since 1.0.0 */ public function setDescription(string $description) : void { $this->description = $description; } /** * Get description * * @return string * * @since 1.0.0 */ public function getDescription() : string { return $this->description; } /** * Set cost object * * @param string $costObject Cost object * * @return void * * @since 1.0.0 */ public function setCostObject(string $costObject) : void { $this->costObject = $costObject; } /** * Get cost object * * @return string * * @since 1.0.0 */ public function getCostObject() : string { return $this->costObject; } /** * Get id * * @return int * * @since 1.0.0 */ public function getId() : int { return $this->id; } /** * {@inheritdoc} */ public function toArray() : array { return [ 'id' => $this->id, 'createdBy' => $this->createdBy, 'createdAt' => $this->createdAt, 'description' => $this->description, 'costObject' => $this->costObject, ]; } /** * {@inheritdoc} */ public function jsonSerialize() { return $this->toArray(); } }