First-principles study on the electronic structure of Pb10−Cu (PO4)6O (x = 0, 1)