CREATE TABLE ZH_LAYOUT_NEXT (
    ID               NUMBER        NOT NULL,
    NAME             VARCHAR2(500) NOT NULL,
    CONTENT          CLOB          NOT NULL,
    CDOPERADOR       VARCHAR2(12)  NOT NULL,
    IS_PUBLIC        VARCHAR2(1)   DEFAULT 'N' NOT NULL,
    IDATIVO          VARCHAR2(1)   DEFAULT 'S' NOT NULL,
    NRORG            NUMBER        DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 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_ZH_LAYOUT_NEXT          PRIMARY KEY (ID),
		CONSTRAINT FK_ZH_LAYOUT_NEXT_OPER     FOREIGN KEY (CDOPERADOR) REFERENCES OPERADOR (CDOPERADOR),
		CONSTRAINT CKC_IDATIVO_LAYOUT_NEXT    CHECK (IDATIVO IN ('S','N')),
		CONSTRAINT CKC_IS_PUBLIC_LAYOUT_NEXT  CHECK (IS_PUBLIC IN ('S','N'))
)
/