public function getNotifications()
    {
        if ($this instanceof RESTUser) {
            return $this->hasMany(RESTDatabaseNotification::class, ['notifiable_id' => 'id'])
                ->onCondition(['notifiable_class' => self::class])
                ->addOrderBy(['created_at' => SORT_DESC]);
        } else {
            return $this->hasMany(DatabaseNotification::class, ['notifiable_id' => 'id'])
                ->onCondition(['notifiable_class' => self::class])
                ->addOrderBy(['created_at' => SORT_DESC]);
        }
    }