protected function beforeCreate()
 {
     $this->setIp(IP);
     $this->setTs(NOW);
     $this->setAgent(USER_AGENT);
     parent::beforeCreate();
 }
 public function beforeCreate()
 {
     $this->setField('date_created', NOW);
     $this->setField('ip', IP);
     parent::beforeCreate();
 }