The generic DC motor extended with pins for a two-phase hall-encoder (I took the pinout of the motors I used in my current project VT-E-G25A-06-177E from V-Tec):
1 - Motor +
2 - Encoder +
3 - Encoder Phase A
4 - Encoder Phase B
5 - Encoder -
6 - Motor -