CREATE TABLE MOVLOJA 
(
  NRSEQMOVLOJA  		VARCHAR2(10)  	NOT NULL,
  CDFILIAL         		VARCHAR2(4)          NOT NULL,
  CDLOJA           		VARCHAR2(10)  	NOT NULL,    
  CDTIPORECE       		VARCHAR2(3)          NOT NULL,
  DTMOVIMENTO    	DATE                 	NOT NULL, 
  VRSANGRIA      		FLOAT(126)      	NOT NULL, 
  VRVENDAS      		FLOAT(126)      	NOT NULL,  
  VRCONFERIDO   		FLOAT(126)      	NOT NULL,
  IDCONFERIDO  		VARCHAR2(1) 	DEFAULT 'N' NOT NULL
	CONSTRAINT CKC_IDCONF_MOVLOJA CHECK (IDCONFERIDO IN ('S', 'N')),
  IDAPROVACAO  		VARCHAR2(1) 	DEFAULT 'N' NOT NULL
	CONSTRAINT CKC_IDAPROV_MOVLOJA CHECK (IDAPROVACAO IN ('S', 'N')),
  DTALTERACAO      		DATE                 	NOT NULL, 
  NRORG           		NUMBER      	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
  IDATIVO                 	VARCHAR2(1)    	DEFAULT 'S' NOT NULL
      CONSTRAINT CKC_IDATIVO_MOVLOJA CHECK (IDATIVO IN ('S','N')),
  DTINCLUSAO       		DATE            	NULL,
  DTULTATU         		DATE            	NULL,
  NRORGINCLUSAO    	NUMBER          	DEFAULT 1 NULL,
  CDOPERINCLUSAO   	VARCHAR2(12)    	DEFAULT '1' NULL,
  NRORGULTATU      	NUMBER          	DEFAULT 1 NULL,
  CDOPERULTATU     	VARCHAR2(12)    	DEFAULT '1' NULL,
	CONSTRAINT PK_MOVLOJA PRIMARY KEY (NRSEQMOVLOJA, CDFILIAL, CDTIPORECE, DTMOVIMENTO)
)
