tl;dr: There is a special process called collective redundancy which requires a 30 day notice given to the workers.
There are also country-specific rules.