Nothing I can see on BA indicates that you can't collect Avios on a prime CZ flight. [edit: [url=https://www.britishairways.com/en-gb/executive-club/collecting-avios/flights]as per BA under "Codeshare Flights"]
Whether you collect Avios and Tier Points depends on the airline flight number on your ticket:
- If your flight code is British Airways, you’ll collect Avios and Tier Points no matter who operates the flight.
- If your flight code is for a oneworld airline, you’ll collect Avios only if your flight is also operated by a oneworld airline.
- For other flight codes, you won’t collect Avios.
However, I suspect that there's an unwritten rule that the CZ flight must be BA-coded for you to earn any Avios... So my hunch is that it would need to be a connecting flight unless BA can sell the individual CZ segments as BA.
I guess it would not hurt to try a dummy booking on CZ's site to see if they will accept a BA FFN?