Doubly charmed tetraquarks in a diquark–antidiquark model