This commit is contained in:
Juan Pablo Vial
2025-03-03 14:55:57 -03:00
parent 4aa88d5164
commit ef54c36edc
6 changed files with 104 additions and 7 deletions

View File

@ -36,11 +36,22 @@ class Broker extends Common\Ideal\Repository
return $model;
}
/**
* @param Define\Model $model
* @param array $new_data
* @return Model\Proyecto\Broker
* @throws Common\Implement\Exception\EmptyResult
*/
public function edit(Common\Define\Model $model, array $new_data): Model\Proyecto\Broker
{
return $this->update($model, ['rut', 'digit', 'name'], $new_data);
}
/**
* @param string $name
* @return Model\Proyecto\Broker|null
* @throws Common\Implement\Exception\EmptyResult
*/
public function fetchByName(string $name): ?Model\Proyecto\Broker
{
$query = $this->connection->getQueryBuilder()