Actualizacion de Modelos
This commit is contained in:
@ -9,15 +9,22 @@ class Broker extends Common\Ideal\Model
|
||||
public string $digit;
|
||||
public string $name;
|
||||
|
||||
public ?Broker\Data $data = null;
|
||||
protected ?Broker\Data $data = null;
|
||||
public function data(): ?Broker\Data
|
||||
{
|
||||
if (!isset($this->data)) {
|
||||
$this->data = $this->runFactory('data');
|
||||
}
|
||||
return $this->data;
|
||||
}
|
||||
|
||||
protected function jsonComplement(): array
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'rut' => $this->rut,
|
||||
'digit' => $this->digit,
|
||||
'name' => $this->name,
|
||||
'data' => $this->data
|
||||
'data' => $this->data()
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user