CREATE TABLE GATESLOGIN (
    NRGATESLOGIN        NUMBER          NOT NULL,
    CDPRODUCT           VARCHAR2(50),
    CDOATESIDEMP        VARCHAR2(50),
    CDOATESIDPROD       VARCHAR2(50),           
    NMGATESCERT         VARCHAR2(200),
    CDGATESCERT         VARCHAR2(2000),
    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 PK_GATESLOGIN PRIMARY KEY (NRGATESLOGIN, NRORG),
        CONSTRAINT CKC_IDATIVO_GATESLOGIN CHECK (IDATIVO IN ('S','N'))
)
/