I just want to compute the flat cover of $\mathbb{Z}_{n}$ as a $\mathbb{Z}$-module. So let's just recall the definition of a flat cover:
For a left $R$-module $M$, a module $X \in \chi$ is called an $\chi$-cover of $M$ if there is a linear map $\phi: X \to M$ such that the following hold:
(i) For any linear map $\phi': X' \to M$ with $X' \in \chi$, there exist a linear map $f: X' \to X$ with $\phi'=\phi f$.
(ii) If $f$ is an endomorphism of $X$ with $\phi= \phi f$, then $f$ must be an automorphism.
In our case $\chi$ must be the class of all flat $\mathbb{Z}$-modules, also in general the class $\mathcal{X}$ for defining a cover need to be closed under isomorphisms and it's assumed that $\chi$ is closed under taking finite direct sums and direct summands. My hunch is that $\mathbb{Z}$ as a $\mathbb{Z}$-module is the flat cover of $\mathbb{Z}_{n}$ with the canonical epimorphism $\phi: \mathbb{Z} \to \mathbb{Z}_ {n}$ defined as $\phi(a):= [a]_{n}$ for every $a \in \mathbb{Z}$. For the first condition from the definition of a flat cover, I suppose there is another linear map $\phi': X \to \mathbb{Z}_{n}$, so I define $f:X' \to \mathbb{Z}$ as $f(x'):=x$ for every $x' \in X'$ where $x \in \mathbb{Z}$ is such that $\phi(x) = \phi '(x')$, then for every $x' \in X'$ it yields that $\phi f (x')= \phi (x) = \phi ' (x')$. For the condition (ii) of flat cover Im not quite sure how if I suppose that $f$ is an epimorphism. in other words $\mathbb{Z}= X'$ and $\phi= \phi f$, then $f$ is an automorphism (that is $f$ is an isomorphism.) I tried to prove first that $\ker(f)=0$ but I cannot assure this happens neither to prove that $f$ is surjective. Maybe my election of $\phi$ is not the right one or maybe $\mathbb{Z}$ is not the flat cover of $\mathbb{Z}_{n}$. I'm sorry Im a layman in the matter and there is no much info in the literature about computing flat covers. Thanks