A hysteretic model based on plastic and damage mechanisms for seismic analysis of inelastic structures