  Linear codes have been an interesting topic in both theory and practice for
many years. In this paper, for an odd prime power $q$, we construct some class
of linear code over finite field $\mathbb{F}_q$ with defining set be the
preimage of general quadratic form function and determine the explicit complete
weight enumerators of the linear codes. Our construction cover all the
corresponding result with quadratic form function and they may have
applications in cryptography and secret sharing schemes.
