'integer', 'code' => 'string', 'apple_category' => 'string', 'google_category' => 'string', ]; public function getParent() { $parentId = $this->attributes['parent_id']; return $parentId != 0 ? (new CategoryModel())->findParent($parentId) : null; } }