A general model to describe the electrostatic potential at electrolyte oxide interfaces