The council shall fix by ordinance the terms of service, not to exceed the term of the mayor, of all the officers appointed or elected whose terms are not prescribed by law.