If you're on an AA flight #, it's as if you're on an AA plane for miles purposes. Full EQM and EQP based on fare basis, which is an AA fare.
Edit: I've never found an AA codeshare on Dragon metal, but it sure beats the CX model of having to fly an H fare or higher. AA codeshares on other metal (even non-oneworld) will always be treated like you're on an AA plane!