Sex workers have workers’ rights: Court