Implemented repository mapper, and venta show

This commit is contained in:
Juan Pablo Vial
2023-08-08 23:53:49 -04:00
parent ef30ae67d2
commit 59825259b6
111 changed files with 2766 additions and 612 deletions

View File

@ -7,6 +7,19 @@ abstract class Model implements Define\Model
{
public int $id;
protected array $factories;
public function addFactory(string $property, Define\Repository\Factory $factory): Model
{
$this->factories[$property] = $factory;
return $this;
}
protected function runFactory(string $property): mixed
{
return $this->factories[$property]->run();
}
public function jsonSerialize(): mixed
{
return [