/**
  * Insert category
  *
  * @param CategoryEntity $category category object
  * @return CategoryEntity
  */
 public function insert(CategoryEntity $category)
 {
     $attributes = $category->getAttributes();
     $now = date('Y-m-d H:i:s');
     $attributes = array_merge($attributes, ['createdAt' => $now, 'updatedAt' => $now]);
     $id = $this->conn->table($this->table)->insertGetId($attributes);
     return $this->createEntity(array_merge($attributes, compact('id')));
 }