You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: bad_blocks.go
    path of file: ./repos/go-ibax/packages/storage/sqldb
    
    the code of the file until where you have to start completion: /*---------------------------------------------------------------------------------------------
 *  Copyright (c) IBAX. All rights reserved.
 *  See LICENSE in the projec
    
func (r *BadBlocks) GetNodeBlocks(nodeId int64, now time.Time) ([]BadBlocks, error) {
	var res []BadBlocks
	err := DBConn.
		Table(r.TableName()).
		Model(&BadBlocks{}).
		Where(
			"producer_node_id = ? AND block_time > ?::date - interval '24 hours' AND deleted = ?",
			nodeId,
			now,
			false,
		).
		Scan(&res).
		Error

	return res, err
}