$this->id, 'term_name' => $this->term_name, 'description' => $this->description, 'date_create' => $this->date_create, 'user_id' => $this->user_id, 'status' => (bool) $this->status, 'type' => $this->whenLoaded('type', fn () => $this->type?->type), 'fluctuations_count' => $this->when( isset($this->fluctuations_count), fn () => (int) $this->fluctuations_count ), 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }