  Recently, linear codes constructed from defining sets have been investigated
extensively and they have many applications. In this paper, for an odd prime
$p$, we propose a class of $p$-ary linear codes by choosing a proper defining
set. Their weight enumerators and complete weight enumerators are presented
explicitly. The results show that they are linear codes with three weights and
suitable for the constructions of authentication codes and secret sharing
schemes.
