{{ "timestamps = false; } public function toDbo() { $dbo = new {{ dbo_name.camel_upper }}(); {% for column in columns %} $dbo->set{{ column.name.camel_upper }}($this->{{ column.name.as_it }}); {% endfor %} return $dbo; } /** * @param $dbo \App\Http\DBO\{{ dbo_name.camel_upper }} * @param $dam LuModel|null * @return {{ model_name.camel_upper }} */ public function fromDbo($dbo, $dam = null) { if (is_null($dam)) $dam = new {{ model_name.camel_upper }}(); {% for column in columns %} $dam->{{ column.name.as_it }} = $dbo->get{{ column.name.camel_upper }}(); {% endfor %} return $dam; } }