status = self::STATUS_PENDING; $this->created_at = time(); if (!empty($this->item_info)) { $this->item_info = kg_json_encode($this->item_info); } else { $this->item_info = ''; } } public function beforeUpdate() { $this->updated_at = time(); if (!empty($this->item_info)) { $this->item_info = kg_json_encode($this->item_info); } } public function afterFetch() { if (!empty($this->item_info)) { $this->item_info = json_decode($this->item_info, true); } } }