This seems like a case of constructive dismissal.
Constructive dismissal is very common in organisations. As such, most employees usually leave their boss and not the organisation. This could be because they don’t like the behaviour of the employer, were bullied at work, harassed, there was violence against you or the employers made you work in dangerous conditions.
If an employee resigns from his/her job because of the employer then it could be considered as constructive dismissal. But, the employee has to show that the employer has committed a serious breach of contract which forced you to take such an action.
Breach of contract would involve any of these conditions – your employer did not pay your dues or demoted you without any reason, hard/dangerous working conditions, change in the schedule outside your contract note such as night shifts, harassment, violence, etc.
In such cases employees retain the right to seek legal course of action against the company and claim damages.