func (Db *Database) InsertEndereco(endereco structs.Endereco) int {
	var keys_list, values_list []string

	dict := utils.StructToMap(endereco)
	for k, v := range dict {
		if k == "Id" {
			continue
		}

		keys_list = append(keys_list, strings.ToLower(k))
		values_list = append(values_list, "'"+v+"'")
	}

	keys := strings.Join(keys_list, ",")
	values := strings.Join(values_list, ",")

	var row_id int
	sql := fmt.Sprintf("INSERT INTO endereco (%s) VALUES (%s) RETURNING id;", keys, values)
	fmt.Println(sql)
	err := Db.conn.QueryRow(sql).Scan(&row_id)
	if err != nil {
		panic(err)
	}

	return row_id
}
func (Db *Database) InsertPessoaFisica(pf structs.PessoaFisica) int {
	var keys_list, values_list []string
	end_row_id := Db.InsertEndereco(pf.Endereco)

	dict := utils.StructToMap(pf)
	for k, v := range dict {
		if k == "Endereco" || k == "Id" {
			continue
		}

		keys_list = append(keys_list, strings.ToLower(k))
		values_list = append(values_list, "'"+v+"'")
	}

	keys_list = append(keys_list, "endereco_id")
	values_list = append(values_list, fmt.Sprintf("%d", end_row_id))

	keys := strings.Join(keys_list, ",")
	values := strings.Join(values_list, ",")

	var row_id int
	sql := fmt.Sprintf("INSERT INTO pessoa_fisica (%s) VALUES (%s) RETURNING id;", keys, values)
	fmt.Println(sql)
	err := Db.conn.QueryRow(sql).Scan(&row_id)
	if err != nil {
		panic(err)
	}

	return row_id
}