CREATE TABLE CONFCUSTOMTAA(
    CDCONFIGTAA 			VARCHAR2(5) NOT NULL, 
    NMCONFIGTAA 			VARCHAR(50) NOT NULL,
    CDFILIAL 				VARCHAR2(4) NOT NULL,
    CDLOJA 				    VARCHAR2(10) NOT NULL,
    CORESJSON 				BLOB NULL,
    JSONCONFIG 				BLOB NULL,
    JSONB64CUSTOMMEDIA 		BLOB NULL,
    NRORG             		NUMBER 	      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO           		VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
    DTINCLUSAO        		DATE            DEFAULT SYSDATE,
    DTULTATU          		DATE            DEFAULT SYSDATE,
    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',
		CONSTRAINT CKC_IDATIVO_CONFCUSTOMTAA CHECK (IDATIVO IN ('S','N'))
)
/

CREATE TABLE CAIXACUSTOMTAA(
    CDCONFIGTAA 	  VARCHAR2(5) NOT NULL, 
    CDFILIAL 		  VARCHAR2(4) NOT NULL,
    CDLOJA 			  VARCHAR2(10) NOT NULL,
    CDCAIXA 		  VARCHAR2(10) NOT NULL,
    NRORG             NUMBER 	      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 		NOT NULL,
    IDATIVO           VARCHAR2(1)     DEFAULT 'S'					NOT NULL,
    DTINCLUSAO        DATE            DEFAULT SYSDATE,
    DTULTATU          DATE            DEFAULT SYSDATE,
    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',
		CONSTRAINT CKC_IDATIVO_CAIXACUSTOMTAA CHECK (IDATIVO IN ('S','N'))
)
/