Compact star models in class I spacetime