Restricting Pages based on Hierarchy and User Role

I was recently faced with a similar situation and chose to use custom post types. While it’s technically possible to use page hierarchies or categories it would make handling user access too complicated.

If my understanding is correct then your desired permalink structure will be there by default:

slug for custom post type

PS: if you want to keep the hierarchical structure inside ‘vegetable’ posts, then make sure you set the post type to ‘hierarchical’ (like pages).