Phase-field crystal model for heterostructures