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