create_time = time(); } public function beforeUpdate() { $this->update_time = time(); } public function beforeSave() { if (is_array($this->item_info) || is_object($this->item_info)) { $this->item_info = kg_json_encode($this->item_info); } } public function afterFetch() { if (is_string($this->item_info)) { $this->item_info = json_decode($this->item_info, true); } } }