-- apkt_transactional.ss_309 definition

-- Drop table

-- DROP TABLE apkt_transactional.ss_309;

CREATE TABLE apkt_transactional.ss_309 (
	id bigserial NOT NULL,
	thbllap varchar NULL,
	jenislap varchar NULL,
	id_ulp bigint NULL,
	no_baris bigint NULL,
	goltarif varchar NULL,
	tarif varchar NULL,
	daya_min bigint NULL,
	daya_max bigint NULL,
	"label" varchar NULL,
	label_asterik varchar NULL,
	jmlplg bigint NULL,
	jmldaya bigint NULL,
	jmlkwh bigint NULL,
	kwhlwbp bigint NULL,
	kwhwbp bigint NULL,
	kelbkvarh bigint NULL,
	rpbeban bigint NULL,
	rpkwh bigint NULL,
	rpkvarh bigint NULL,
	rpptl bigint NULL,
	rata_va_langganan bigint NULL,
	rata_kwh_langganan bigint NULL,
	rata_rp_kwh bigint NULL,
	jam_nyala bigint NULL,
	kwh_sd_bln_ini bigint NULL,
	kvarh_sd_bln_ini bigint NULL,
	r_beban_sd_bln_ini bigint NULL,
	b_kwh_sd_bln_ini bigint NULL,
	b_kvarh_sd_bln_ini bigint NULL,
	jumlah_sd_bln_ini bigint NULL,
	rp_kwh_sd_bln_ini bigint NULL,
	CONSTRAINT ss_309_pkey PRIMARY KEY (id)
);


-- apkt_transactional.ss_309 foreign keys

ALTER TABLE apkt_transactional.ss_309 ADD CONSTRAINT ulp FOREIGN KEY (id_ulp) REFERENCES apkt_transactional.master_ulp(id);