$\theta$-Generalized monomial codes