public function delete($model)
    {
        $this->db->connect()
            ->deleteFrom($this->table)
            ->where($this->key . ' = ?')
            ->execute([$model->{$this->key}]);
        $model->{$this->key} = null;
    }