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

@ -50,11 +50,23 @@ class Data extends Common\Ideal\Repository
[$model->broker->rut, $model->representative?->rut, $model->legalName]);
return $model;
}
/**
* @param Common\Define\Model $model
* @param array $new_data
* @return Model\Proyecto\Broker\Data
* @throws Common\Implement\Exception\EmptyResult
*/
public function edit(Common\Define\Model $model, array $new_data): Model\Proyecto\Broker\Data
{
return $this->update($model, ['representative_rut', 'legal_name'], $new_data);
}
/**
* @param int $broker_rut
* @return Model\Proyecto\Broker\Data
* @throws Common\Implement\Exception\EmptyResult
*/
public function fetchByBroker(int $broker_rut): Model\Proyecto\Broker\Data
{
$query = $this->connection->getQueryBuilder()