mirror of
https://github.com/openvk/chandler.git
synced 2024-11-15 03:31:12 +03:00
Allow unwrapping database models to raw record data
This commit is contained in:
parent
9606b74aed
commit
064b392671
1 changed files with 5 additions and 0 deletions
|
@ -63,6 +63,11 @@ abstract class DBEntity
|
|||
return (bool) $this->getRecord()->deleted;
|
||||
}
|
||||
|
||||
function unwrap(): object
|
||||
{
|
||||
return (object) $this->getRecord()->toArray();
|
||||
}
|
||||
|
||||
function delete(bool $softly = true): void
|
||||
{
|
||||
if(is_null($this->record))
|
||||
|
|
Loading…
Reference in a new issue