Permanence and global stability of a class of discrete epidemic models