Two equivalent linear codes have the same weight enumerator but the converse does not hold. We investigate which code is unique up to equivalence in view of the weight enumerator. The main purpose of this paper is to investigate the weight enumerators associated to the only one equivalent class of linear codes and to construct these codes. Furthermore, we construct non-equivalent linear codes with the same weight enumerator and give the generator matrices of these codes.