CREATE TABLE INDICPAINEL (
    NRINDICPAINEL		NUMBER         												NOT NULL,
    NRPERFACLPAINEL     NUMBER         												NOT NULL,
    NRINDICADORTF       NUMBER   													NOT NULL,
    IDVISUINDIC         VARCHAR2(01)   	DEFAULT 'S' 								NOT NULL
		CONSTRAINT CKC_IDVISUINDIC CHECK (IDVISUINDIC IN ('S', 'N')),
    NRORG               NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
    IDATIVO             VARCHAR2(1)    	DEFAULT 'S'  								NOT NULL
    CONSTRAINT CKC_IDATIVO_INDICPAINEL CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO          DATE           												NULL,
    DTULTATU            DATE           												NULL,
    NRORGINCLUSAO       NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERINCLUSAO      VARCHAR2(12)   	DEFAULT '1'  								NULL,
    NRORGULTATU         NUMBER			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NULL,
    CDOPERULTATU        VARCHAR2(12)	DEFAULT '1' 								NULL,
      CONSTRAINT PK_INDICPAINEL PRIMARY KEY (NRINDICPAINEL)
)
/
ALTER TABLE INDICPAINEL ADD
	CONSTRAINT FKGOP00728PERFACLPAINEL FOREIGN KEY (NRPERFACLPAINEL)
		REFERENCES PERFACLPAINEL (NRPERFACLPAINEL)
/
CREATE INDEX FKGOP00728PERFACLPAINEL ON INDICPAINEL (NRPERFACLPAINEL)
/
ALTER TABLE INDICPAINEL ADD
	CONSTRAINT FKGOP00729INDICADORTF FOREIGN KEY (NRINDICADORTF)
		REFERENCES INDICADORTF (NRINDICADORTF)
/
CREATE INDEX FKGOP00729INDICADORTF ON INDICPAINEL (NRINDICADORTF)
/
CREATE TABLE INDICPAINEXCOPER (
    NRINDICPAINEXCOPER	NUMBER          											NOT NULL,
    NRINDICPAINEL       NUMBER         												NOT NULL,
    CDOPERADOR          VARCHAR2(12)   												NOT NULL,
    NRORG               NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')	NOT NULL,
    IDATIVO             VARCHAR2(1)		DEFAULT 'S'  								NOT NULL
    CONSTRAINT CKC_IDATIVO_INDICPAINEXCOPER CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO          DATE           												NULL,
    DTULTATU            DATE           												NULL,
    NRORGINCLUSAO       NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERINCLUSAO      VARCHAR2(12)   	DEFAULT '1'  								NULL,
    NRORGULTATU         NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERULTATU        VARCHAR2(12)	DEFAULT '1' 								NULL,
      CONSTRAINT PK_INDICPAINEXCOPER PRIMARY KEY (NRINDICPAINEXCOPER)
)
/
ALTER TABLE INDICPAINEXCOPER ADD
	CONSTRAINT FKGOP00730INDICADORTF FOREIGN KEY (NRINDICPAINEL)
		REFERENCES INDICPAINEL (NRINDICPAINEL)
/
CREATE INDEX FKGOP00730INDICADORTF ON INDICPAINEXCOPER (NRINDICPAINEL)
/
ALTER TABLE INDICPAINEXCOPER ADD
	CONSTRAINT FKGOP00731OPERADOR FOREIGN KEY (CDOPERADOR)
		REFERENCES OPERADOR (CDOPERADOR)
/
CREATE INDEX FKGOP00731OPERADOR ON INDICPAINEXCOPER (CDOPERADOR)