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