CREATE TABLE apkt_transactional.gangguan (
	id bigserial NOT NULL,
	id_pelanggan_no_meter int8 NULL,
	id_posko int8 NULL,
	id_tipe_permasalahan int8 NULL,
	alamat_pelanggan varchar(255) NULL,
	nama_pelapor varchar(255) NULL,
	telepon_pelapor varchar(255) NULL,
	hp_pelapor varchar(255) NULL,
	fax_pelapor varchar(255) NULL,
	email_pelapor varchar(255) NULL,
	alamat_pelapor varchar(4000) NULL,
	media varchar(255) NULL,
	lokasi public.geometry(point, 4326) NULL,
	no_laporan varchar NULL,
	keterangan varchar(4000) NULL,
	created_date timestamp(6) NULL,
	created_by int8 NULL,
	updated_date timestamp(6) NULL,
	updated_by int8 NULL,
	status_akhir varchar(50) NULL,
	unit int8 NULL,
	eskalasi int8 NULL,
	permasalahan varchar NULL,
	waktu_lapor timestamp NULL,
	id_regu int8 NULL,
	waktu_penugasan timestamp NULL,
	waktu_perjalanan timestamp NULL,
	waktu_pengerjaan timestamp NULL,
	waktu_nyala_sementara timestamp NULL,
	waktu_nyala timestamp NULL,
	waktu_batal timestamp NULL,
	waktu_selesai timestamp NULL,
	alasan varchar NULL,
	patokan varchar NULL,
	id_sub_tipe_permasalahan int8 NULL,
	tipe_gangguan int8 NULL,
	alasan_pembatalan varchar NULL,
	jarak int8 NULL,
	id_kelompok int8 NULL,
	id_sub_fasilitas int8 NULL,
	id_equipment int8 NULL,
	id_prioritas int8 NULL,
	id_penyebab int8 NULL,
	jumlah_pelanggan_termarking int8 NULL,
	jumlah_lapor int8 NULL,
	waktu_konfirmasi timestamp NULL,
	id_fasilitas int8 NULL,
	id_kelompok_utama int8 NULL,
	id_dampak int8 NULL,
	id_grup_penyebab_gangguan int8 NULL,
	id_kelurahan int8 NULL,
	ctt varchar NULL,
	id_tindakan int8 NULL,
	id_cuaca int8 NULL,
	fax varchar NULL,
	keterangan_lokasi varchar NULL,
	waktu_fax timestamp NULL,
	nama_media varchar NULL,
	waktu_media timestamp NULL,
	merk_meter varchar NULL,
	id_tarif_daya int8 NULL,
	id_merk_meter int8 NULL,
	daya_tarif int8 NULL,
	penyebab_sementara varchar NULL,
	alasan_nyala_sementara varchar NULL,
	tindakan_telah_dilakukan_nyala_sementara varchar NULL,
	usulan_tindakan_selanjutnya varchar NULL,
	tindakan_telah_dilakukan_nyala varchar NULL,
	penyebab_nyala varchar NULL,
	jumlah_pelanggan_padam int8 NULL,
	is_konfirmasi bool NULL,
	pelanggaran bool NULL,
	id_feeder_penyebab_tindakan int8 NULL,
	komponen_yang_terganggu_feeder varchar NULL,
	tindakan_yang_dilakukan_feeder varchar NULL,
	ccv bool NULL,
	konfirmasi varchar NULL,
	no_meter varchar NULL,
	deskripsi varchar NULL,
	waktu_padam timestamp NULL,
	rating int8 NULL,
	no_tiket_crm varchar NULL,
	no_lapor_pln varchar NULL,
	no_kerja varchar NULL,
	ulasan_rating varchar NULL,
	"tipe_batal" apkt_transactional."tp_batal" NULL,
	tipe_wo apkt_transactional."tp_wo" NULL,
	id_referensi_marking int8 NULL,
	waktu_marking timestamp NULL,
	keterangan_marking varchar NULL,
	foto_pelanggan varchar NULL,
	foto_tindak_lanjut varchar NULL,
	flag_padam int8 NULL,
	jenis_aduan apkt_transactional."tp_jenis_gangguan" NULL,
	waktu_rating timestamp NULL,
	status_rating varchar NULL,
	keterangan_rating varchar NULL,
	feedback_rating varchar NULL,
	isfax varchar(1) NULL,
	tipe_referensi_marking apkt_transactional."tp_referensi_marking" NULL,
	daya int4 NULL,
	no_laporan_referensi_marking varchar NULL,
	selesai_by int8 NULL,
	dispatch_by int8 NULL,
	is_automarking apkt_transactional."tp_automarking" NULL,
	listriqu apkt_transactional."tp_listriqu" NULL,
	CONSTRAINT gangguan_pkey PRIMARY KEY (id)
);



CREATE TABLE apkt_transactional.gangguan (
	id bigserial NOT NULL,
	id_pelanggan_no_meter int8 NULL,
	id_posko int8 NULL,
	id_tipe_permasalahan int8 NULL,
	alamat_pelanggan varchar(255) NULL,
	nama_pelapor varchar(255) NULL,
	telepon_pelapor varchar(255) NULL,
	hp_pelapor varchar(255) NULL,
	fax_pelapor varchar(255) NULL,
	email_pelapor varchar(255) NULL,
	alamat_pelapor varchar(4000) NULL,
	media varchar(255) NULL,
	lokasi public.geometry(point, 4326) NULL,
	no_laporan varchar NULL,
	keterangan varchar(4000) NULL,
	created_date timestamp(6) NULL,
	created_by int8 NULL,
	updated_date timestamp(6) NULL,
	updated_by int8 NULL,
	status_akhir varchar(50) NULL,
	unit int8 NULL,
	eskalasi int8 NULL,
	permasalahan varchar NULL,
	waktu_lapor timestamp NULL,
	id_regu int8 NULL,
	waktu_penugasan timestamp NULL,
	waktu_perjalanan timestamp NULL,
	waktu_pengerjaan timestamp NULL,
	waktu_nyala_sementara timestamp NULL,
	waktu_nyala timestamp NULL,
	waktu_batal timestamp NULL,
	waktu_selesai timestamp NULL,
	alasan varchar NULL,
	patokan varchar NULL,
	id_sub_tipe_permasalahan int8 NULL,
	tipe_gangguan int8 NULL,
	alasan_pembatalan varchar NULL,
	jarak int8 NULL,
	id_kelompok int8 NULL,
	id_sub_fasilitas int8 NULL,
	id_equipment int8 NULL,
	id_prioritas int8 NULL,
	id_penyebab int8 NULL,
	jumlah_pelanggan_termarking int8 NULL,
	jumlah_lapor int8 NULL,
	waktu_konfirmasi timestamp NULL,
	id_fasilitas int8 NULL,
	id_kelompok_utama int8 NULL,
	id_dampak int8 NULL,
	id_grup_penyebab_gangguan int8 NULL,
	id_kelurahan int8 NULL,
	ctt varchar NULL,
	id_tindakan int8 NULL,
	id_cuaca int8 NULL,
	fax varchar NULL,
	keterangan_lokasi varchar NULL,
	waktu_fax timestamp NULL,
	nama_media varchar NULL,
	waktu_media timestamp NULL,
	merk_meter varchar NULL,
	id_tarif_daya int8 NULL,
	id_merk_meter int8 NULL,
	daya_tarif int8 NULL,
	penyebab_sementara varchar NULL,
	alasan_nyala_sementara varchar NULL,
	tindakan_telah_dilakukan_nyala_sementara varchar NULL,
	usulan_tindakan_selanjutnya varchar NULL,
	tindakan_telah_dilakukan_nyala varchar NULL,
	penyebab_nyala varchar NULL,
	jumlah_pelanggan_padam int8 NULL,
	is_konfirmasi bool NULL,
	pelanggaran bool NULL,
	id_feeder_penyebab_tindakan int8 NULL,
	komponen_yang_terganggu_feeder varchar NULL,
	tindakan_yang_dilakukan_feeder varchar NULL,
	ccv bool NULL,
	konfirmasi varchar NULL,
	no_meter varchar NULL,
	deskripsi varchar NULL,
	waktu_padam timestamp NULL,
	rating int8 NULL,
	no_tiket_crm varchar NULL,
	no_lapor_pln varchar NULL,
	no_kerja varchar NULL,
	ulasan_rating varchar NULL,
	"tipe_batal" apkt_transactional."tp_batal" NULL,
	tipe_wo apkt_transactional."tp_wo" NULL,
	id_referensi_marking int8 NULL,
	waktu_marking timestamp NULL,
	keterangan_marking varchar NULL,
	foto_pelanggan varchar NULL,
	foto_tindak_lanjut varchar NULL,
	flag_padam int8 NULL,
	jenis_aduan apkt_transactional."tp_jenis_gangguan" NULL,
	waktu_rating timestamp NULL,
	status_rating varchar NULL,
	keterangan_rating varchar NULL,
	feedback_rating varchar NULL,
	isfax varchar(1) NULL,
	tipe_referensi_marking apkt_transactional."tp_referensi_marking" NULL,
	daya int4 NULL,
	no_laporan_referensi_marking varchar NULL,
	selesai_by int8 NULL,
	dispatch_by int8 NULL,
	is_automarking apkt_transactional."tp_automarking" NULL,
	listriqu apkt_transactional."tp_listriqu" NULL,
	CONSTRAINT gangguan_pkey PRIMARY KEY (id)
);

