Actualizacion de Modelos
This commit is contained in:
@ -9,15 +9,22 @@ class Broker extends Common\Ideal\Model
|
|||||||
public string $digit;
|
public string $digit;
|
||||||
public string $name;
|
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 [
|
return [
|
||||||
'rut' => $this->rut,
|
'rut' => $this->rut,
|
||||||
'digit' => $this->digit,
|
'digit' => $this->digit,
|
||||||
'name' => $this->name,
|
'name' => $this->name,
|
||||||
'data' => $this->data
|
'data' => $this->data()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user