ReWork Notification Model/Module/Object/Repository/Factory

- Introduce Repository for interaction with "notify" table
- Introduce Factory for read-only notification objects (they're just loosely based on notification the table!)
- Introduce Objects for type-safe usage at the presentation layer
- Reworked Model, which is now fully based on the notify table, including generated fields (cache, ..)
This commit is contained in:
nupplaPhil 2020-01-25 02:01:49 +01:00
parent 230bb6dd53
commit 0850fb88dd
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
17 changed files with 1413 additions and 851 deletions

View file

@ -122,7 +122,12 @@ abstract class BaseRepository extends BaseFactory
*/
public function update(BaseModel $model)
{
return $this->dba->update(static::$table_name, $model->toArray(), ['id' => $model->id], $model->getOriginalData());
if ($this->dba->update(static::$table_name, $model->toArray(), ['id' => $model->id], $model->getOriginalData())) {
$model->resetOriginalData();
return true;
}
return false;
}
/**