Investigation on structural, optical and electrical behaviours of Sn doped copper oxide thin films and fabrication of diode