A district may provide by ordinance for the pensioning of officers or employees, for the terms and conditions under which such pensions shall be awarded, and for the time and extent of service of officers or employees before such pensions shall be available to them.