CREATE TABLE SLACLIENTE_ALERT (
    ID NUMBER NOT NULL ,
    CDCLIENTE VARCHAR2(21) NOT NULL,
    CDGRUPFASE VARCHAR2(2) NOT NULL,
    CDASSUNTO VARCHAR2(5) NOT NULL, 
    CDCOMPLEXID VARCHAR2(2) NOT NULL , 
    ID_RESP_PROD_ESTRUT VARCHAR2(1) DEFAULT 'E' NOT NULL,
    STRUCTURE_TYPE_ID NUMBER,
    QTHORASALERT NUMBER, 
    IDANTESDEPOIS VARCHAR2(1 ) DEFAULT 'A' NOT NULL ,
    
    NRORG NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL , 
    DTINCLUSAO DATE, 
    DTULTATU DATE, 
    NRORGINCLUSAO NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'), 
    CDOPERINCLUSAO VARCHAR2(12 ) DEFAULT '1', 
    NRORGULTATU NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'), 
    CDOPERULTATU VARCHAR2(12 ) DEFAULT '1', 
    IDATIVO VARCHAR2(1 ) DEFAULT 'S' NOT NULL,
   
    CONSTRAINT PK_SLACLIENTE_ALERT PRIMARY KEY (ID),    
    
    CONSTRAINT CKC_IDATIVO_SLACLIENTE_ALERT CHECK (IDATIVO IN ('S','N')) ,
    CONSTRAINT CKC_IDRESP_SLACLI_ALERT CHECK (ID_RESP_PROD_ESTRUT IN ('E','P')) ,    
    CONSTRAINT CKC_ID_IDANTDEP_SLACLI_ALERT CHECK (IDANTESDEPOIS IN ('A','D'))    
   
)
/
