This commit is contained in:
Juan Pablo Vial
2025-03-03 14:57:22 -03:00
parent d165440483
commit 8f16f33a1e
56 changed files with 749 additions and 105 deletions

View File

@ -48,11 +48,23 @@ class Propiedad extends Ideal\Repository
);
return $model;
}
/**
* @param Define\Model $model
* @param array $new_data
* @return Model\Venta\Propiedad
* @throws Implement\Exception\EmptyResult
*/
public function edit(Define\Model $model, array $new_data): Model\Venta\Propiedad
{
return $this->update($model, ['unidad_principal', 'estacionamientos', 'bodegas', 'estado'], $new_data);
}
/**
* @param int $unidad_id
* @return Model\Venta\Propiedad
* @throws Implement\Exception\EmptyResult
*/
public function fetchVigenteByUnidad(int $unidad_id): Model\Venta\Propiedad
{
$query = "SELECT * FROM `{$this->getTable()}` WHERE `unidad_principal` = ?";