I was wondering if someone can help me understand how I should formulate my difference in difference regression. Under a basic two period DiD, I would be estimating an equation similar to: $$ y_{gt} = \beta_0 +\beta_1 Time_t + \beta_2 Group_g +\beta_3 Time\times Group_{gt} + \epsilon_{gt} $$ Where g denotes the group and t denotes the time.
However, I am trying to model a difference in difference, but I have time periods representing pre-treatment, during treatment, and post-treatment. I'm not sure how to capture the effects of the treatment. Originally I was thinking $$ y_{gt}=\beta_0 +\beta_1Post_t +\beta_2Pre_t +\beta_3 Group_g+\beta_4Post\times Group_{gt}+\beta_5 Pre \times Group_{gt}+\epsilon_{gt} $$ But I'm uncertain if this would capture the effect of the treatment. Furthermore, I'm fairly new to Diff in Diff, so I'm no sure what the interaction beta's might imply and whether or not it captures the effect Can someone help?