What does the photoswitch do?
Current draw of motor? It CAN help?
For a SIMPLE system picture using diodes, so that the limit switch only allows the other direction? But, this design CAN require the limit switch and the diodes to handle full current. e.g. Make the limt switch open at each extreme and place a diode across the open switch, so the motor can ONLY go the other way.
There are TWO ways to handle direction and enable. One is to actually use a FWD signal and a REV signal. The other is to use a NOT ENABLE and a DIRECTION SIGNAL.
Using NOT ENABLE means that the motor won;t move when stationary.
It would seem that you would want the photocell to start stop the system and the limit switches to enable/disable a direction. So, it gets a little more complicated.
Think the same way, enable/disable a direction with a diode and limit switch, but use a relay to switch the motor power.
The photocell controls the power.
Doing this without wasting power is a challenge.