Allow unwrapping database models to raw record data

This commit is contained in:
Jill Stingray 2020-08-01 14:10:44 +00:00
parent 9606b74aed
commit 064b392671

View file

@ -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))