FIX: Repository UF

This commit is contained in:
Juan Pablo Vial
2025-05-05 18:13:55 -04:00
parent 5f53c77a1f
commit ea8f483dd5

View File

@ -2,8 +2,10 @@
namespace Incoviba\Repository;
use DateTimeInterface;
use DateTimeImmutable;
use Incoviba\Common\Define;
use Incoviba\Common\Ideal;
use Incoviba\Common\Ideal\Repository;
use Incoviba\Common\Implement;
use Incoviba\Model;
@ -13,6 +15,19 @@ class UF extends Ideal\Repository
{
return 'uf';
}
protected function getIndex(Define\Model $model): string
{
return 'fecha';
}
protected function setIndex(Define\Model &$model, mixed $value): Repository
{
$model->fecha = new DateTimeImmutable($value);
return $this;
}
protected function getKey(): string
{
return 'fecha';
}
public function create(?array $data = null): Model\UF
{