On the reliability and optimal maintenance of systems under a generalized mixed D-shock model