Crystal structure and phase diagrams of iron-based superconductors