Let $C$ be a separated irreducible reduced curve which is quasi-finite over $\mathrm{Spec}\: \mathbb Z$. Is it necessarily affine i.e. $\mathrm{Spec}\: \mathcal O$ where $\mathcal O$ is an order in a number field? What if we look at curves faithfully flat over $\mathrm{Spec}\: \mathbb Z$?

Crossposted from MSE: https://math.stackexchange.com/questions/3098577/what-are-arithmetic-curves