CREATE TABLE menus (
    id              bigint NOT NULL,
    nome            VARCHAR2(255) NOT NULL,
    slug            VARCHAR2(255) NOT NULL,
    route           VARCHAR2(255),
    icone           VARCHAR2(100),
    ordem           INTEGER,
    tipo            SMALLINT,
    sistema_id      bigint NOT NULL,
    rotina_id       bigint,
    acoa_id         bigint,
    menu_pai_id     bigint,
    rotina_acoes_id bigint
);

ALTER TABLE menus
    ADD CHECK ( tipo IN ( 1, 2 ) );