コード例 #1
0
 public function beforeValidate()
 {
     if ($this->getIsNewRecord()) {
         $this->created_at = time();
     }
     $this->updated_at = time();
     return parent::beforeValidate();
 }