BRST approach to minimal models