protected function beforeSave()
{
if(parent::beforeSave())
{
if($this->isNewRecord)
{
$this->create_time = $this->update_time=time();
$this->author_id = Yii::app()->user->id;
}
else
$this->update_time = time();
return true;
}
else
return false;
}
Above is a sample code of model. Can anybody tell me how to edit such automatic generated code in Yii?