I want to run a difference in differences design.

I have a balanced panel of individuals across 10 years, and a certain policy change occurs around year 5. The challenge i'm facing is how to deal with differentiating individuals into treatment/control groups.

The problem is that an individual can fall into the treatment group one year, and then fall into the control group another year. This is based on if an individual satisfies a certain criteria that specific year. How
should i model this "treat" variable?