mirror of
https://github.com/Karaka-Management/oms-Organization.git
synced 2026-02-18 17:28:40 +00:00
reduce serialization of null models
This commit is contained in:
parent
9485c5c1f2
commit
00b607562c
|
|
@ -36,4 +36,12 @@ final class NullDepartment extends Department
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->unit = new NullUnit();
|
$this->unit = new NullUnit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function jsonSerialize() : mixed
|
||||||
|
{
|
||||||
|
return ['id' => $this->id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,4 +35,12 @@ final class NullPosition extends Position
|
||||||
{
|
{
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function jsonSerialize() : mixed
|
||||||
|
{
|
||||||
|
return ['id' => $this->id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,4 +38,12 @@ final class NullUnit extends Unit
|
||||||
$this->id = $id;
|
$this->id = $id;
|
||||||
$this->image = new NullMedia();
|
$this->image = new NullMedia();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function jsonSerialize() : mixed
|
||||||
|
{
|
||||||
|
return ['id' => $this->id];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user