0.1.0
This commit is contained in:
25
src/Mapper/Banco.php
Normal file
25
src/Mapper/Banco.php
Normal file
@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace Incoviba\Mapper;
|
||||
|
||||
use Incoviba\Model\Model;
|
||||
use Incoviba\Model\Common\Banco as BancoModel;
|
||||
|
||||
class Banco extends Mapper
|
||||
{
|
||||
protected string $table = 'banco';
|
||||
|
||||
protected function load(bool|array $row, bool $lazy = false): BancoModel|bool
|
||||
{
|
||||
if (!$row) return false;
|
||||
$model = new BancoModel();
|
||||
$model->id = $row['id'];
|
||||
$model->nombre = $row['nombre'];
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function save(Model $model): bool
|
||||
{
|
||||
// TODO: Implement save() method.
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user