@Ernesto ******
if you aren't married to a Thai you need to work, and pay income tax on wages of at least bt80,000 a month, and bt100,000 a month is recommended, as the basic requirement for applying for permanent residency, then in ten more years of working you can apply for citizenship. If you are married to a Thai after three years of working making a minimum of just bt40,000 a month you can apply for permanent residency, or directly apply for citizenship. There are other requirements, but if you don't work and pay Thai income tax nothing else matters.