public function save($id = null)
    {
        //update this user id value
        if ($id !== null) {
            $this->_data['id'] = $id;
        }

        if ($this->_data['id'] !== null) {
            $action = 'UPDATE ';
            $where = ' WHERE '.$this->_dbConfig['id'].' = :id';
        } else {
            $action = 'INSERT INTO ';
            $where = '';
        }

        $cols = '';
        $vals = [];
        foreach ($this->_data as $k => $v) {
            if ($k !== 'id') {
                $cols .= $this->_dbConfig[$k].' = :'.$k.',';
            }
            $vals[':'.$k] = $v;
        }
        
        $cols = substr($cols, 0, -1); //tirando a ultima vírgula

        $this->_db->query(
            $action.$this->_dbConfig['table']
            .' SET '.$cols.$where, $vals
        );
        return ['action'=>substr($action, 0, 5),
                'rows'=>$this->_db->getRows()];
    }