timestamps = false; } public function toDbo() { $dbo = new SensorsDbo(); $dbo->setId($this->id); $dbo->setName($this->name); $dbo->setDescription($this->description); $dbo->setHostId($this->host_id); $dbo->setEntityTypeId($this->entity_type_id); $dbo->setData($this->data); return $dbo; } /** * @param $dbo SensorsDbo * @param $model LuModel|null * @return Sensors */ public function fromDbo($dbo, $model = null) { if (is_null($model)) $model = new Sensors(); $model->id = $dbo->getId(); $model->name = $dbo->getName(); $model->description = $dbo->getDescription(); $model->host_id = $dbo->getHostId(); $model->entity_type_id = $dbo->getEntityTypeId(); $model->data = $dbo->getData(); return $model; } }