It has been unclear how much immunity an infection of Sars-cov-2 (the virus that gives rise to the Covid-19 disease) gives you, and for how long. But there's some research now. And the news is good, very good.
First, there was a fishing boat. It put to sea with 122 crew, and they were all tested before they set off. Three of the crew were seropositive, meaning that they had had Covid-19 in the past, and now had antibodies against the disease. They, and the rest of the crew, were tested for the presence of the virus before they set off - all were negative.
18 days into the voyage, the boat had to return home because one of the crew needed hospital. All the crew were tested. and 104 of those 122 were infected. Clearly, one of them had boarded with the virus, perhaps at too low a level for the test to reveal it. The fact that 104 were infected, is not surprising - this is a very infectious disease, and these people were all in a confined space.
Now the good news. The three that had been tested for antibodies, were not reinfected. This shows that the antibodies are continuing to work, even after the disease is beaten.
Also. It turns out that Sars-cov-1 memory T cells persist for many years, so we can hope that Sars-Cov-2 is the same. Which would mean that, once you've had Covid-2, you won't get it again. And also, if there's a working vaccine, then that will confer protection for a long time. And so there's a good likelihood that the vaccines being tested will work, in the sense that people being exposed to the virus after vaccination, will get a mild case of the disease, or even be asymptotic.