The incident occurred at around 4:40 p.m. local time (9:40 GMT) when a 14-year-old male gunman sprayed bullets from his Glock 19 pistol, the Khaosod newspaper reported.
About half an hour later, the gunman surrendered to the police.
The perpetrator told police officers that he had heard a voice that ordered him to shoot, according to the report.
He was wearing a black T-shirt, camouflage pants, and a baseball hat with a United States flag on it.
In 2022, Thailand witnessed 2,804 gun-related deaths, and with a firearm death rate of 3.91 per 100,000 people, the country ranked 15th globally, the newspaper reported.