Inside the medina and at the (larger) city center or new town neighborhoods, it is common to see proper seating areas in a restaurant and also common to see families, groups, and couples dining.
BUT…..further you go away to smaller towns or those in-between towns harder it is to find females eating in ANY restaurant. Yes, you will only see men eat or hang out in those restaurants. Not a single girl soul.
So something to keep in mind regardless of who you are traveling with avoids going to a restaurant with all-male presence. Carry some snacks or fruit with you.