-- IBM Confidential
-- OCO Source Materials
-- 5724-I68.
-- (C) Copyright IBM Corp. 2000, 2004 - All Rights Reserved.
-- US Government Users Restricted Rights - Use, duplication or disclosure 
-- restricted by GSA ADP Schedule Contract with IBM Corp. 
-- This file is generated by GenSchema!! DO NOT EDIT!!!
-- This file is generated by GenSchema!! DO NOT EDIT!!!


-- ===================================================================
--
-- Table tevt_que_queue
--
-- Contains the flattened entries for the queue.
-- ===================================================================

drop table tevt_que_queue cascade constraints;
create table tevt_que_queue
( 
    que_id                        number,
    que_user_id                   number(9, 0),
    que_cmp_id                    number(9, 0),
    que_event_name                varchar2(200),
    que_time_stamp                date,
    que_message                   varchar2(4000),
    que_params                    varchar2(4000)
) 
tablespace users;


drop synonym que;
create synonym que for tevt_que_queue;

drop sequence qevt_que_id;
create sequence qevt_que_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tevt_qpr_queue_pointer
--
-- Contains the pointer to the queue for the DeQueueing the of the queue by multiple
-- listeners.
-- ===================================================================

drop table tevt_qpr_queue_pointer cascade constraints;
create table tevt_qpr_queue_pointer
( 
    qpr_dequeue_id                number(9, 0),
    qpr_pointer                   number
) 
tablespace users;


drop synonym qpr;
create synonym qpr for tevt_qpr_queue_pointer;

-- ===================================================================
--
-- Table tevt_ald_alert_description
--

-- ===================================================================

drop table tevt_ald_alert_description cascade constraints;
create table tevt_ald_alert_description
( 
    ald_arl_desc_id               number not null,
    ald_enabled                   char(1),
    ald_user_id                   number(9, 0),
    ald_cmp_id                    number(9, 0),
    ald_event_name                varchar2(100),
    ald_condition                 varchar2(1000),
    ald_alert_description         varchar2(1000),
    constraint ald_0_pk
        primary key (ald_arl_desc_id)
) 
tablespace users;


drop synonym ald;
create synonym ald for tevt_ald_alert_description;

drop sequence qevt_ald_arl_desc_id;
create sequence qevt_ald_arl_desc_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tevt_ads_alert_subscription
--

-- ===================================================================

drop table tevt_ads_alert_subscription cascade constraints;
create table tevt_ads_alert_subscription
( 
    ads_arl_desc_id               number,
    ads_user_id_list              varchar2(300),
    ads_cmp_id                    number(9, 0),
    ads_dist_grps                 varchar2(300),
    ads_dists                     varchar2(300)
) 
tablespace users;


drop synonym ads;
create synonym ads for tevt_ads_alert_subscription;

-- ===================================================================
--
-- Table tevt_act_actionables
--

-- ===================================================================

drop table tevt_act_actionables cascade constraints;
create table tevt_act_actionables
( 
    act_id                        number(9, 0) not null,
    act_cmp_id                    number(9, 0),
    act_type                      varchar2(100),
    act_desc_sub_id               number(9, 0),
    act_recipient_type            varchar2(100),
    act_user_role_id              number(9, 0),
    act_level                     varchar2(100),
    act_event_group_name          varchar2(25),
    act_event_name                varchar2(200),
    act_param_values              varchar2(200),
    act_time_stamp                date,
    act_text                      varchar2(4000),
    act_status                    varchar2(100),
    constraint act_0_pk
        primary key (act_id)
) 
tablespace users;


drop synonym act;
create synonym act for tevt_act_actionables;

drop sequence qevt_act_id;
create sequence qevt_act_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tevt_acm_actionable_messages
--
-- Currenlty this table will only contain the messages coming from external non-trigo sources but
-- ideally the alerts that are stored in the tevt_act_actionables table should also go here.
-- This table only contains the basic information about the alerts and messages and the remaining
-- information will go to the tevt_aca_actionable_attributes table as name value pairs.
-- ===================================================================

drop table tevt_acm_actionable_messages cascade constraints;
create table tevt_acm_actionable_messages
( 
    acm_id                        number(9, 0) not null,
    acm_cmp_id                    number(9, 0),
    acm_queue_id                  number(9, 0),
    acm_msg_id                    number(9, 0),
    acm_action                    varchar2(100),
    acm_state                     varchar2(100),
    acm_type                      varchar2(100),
    acm_recipient_type            varchar2(100),
    acm_status                    varchar2(100),
    acm_time_stamp                date,
    acm_comment                   varchar2(3000),
    constraint acm_0_pk
        primary key (acm_id)
) 
tablespace users;


drop synonym acm;
create synonym acm for tevt_acm_actionable_messages;

drop sequence qevt_acm_id;
create sequence qevt_acm_id start with 1 increment by 200 nocache;

-- ===================================================================
--
-- Table tevt_aca_actionable_attributes
--
-- Contains the attributes as name value pairs for the tevt_acm_actionable_messages table.
-- ===================================================================

drop table tevt_aca_actionable_attributes cascade constraints;
create table tevt_aca_actionable_attributes
( 
    aca_actionable_id             number(9, 0) not null,
    aca_cmp_id                    number(9, 0),
    aca_name                      varchar2(100),
    aca_value                     varchar2(3000),
    constraint aca_0_pk
        primary key (aca_actionable_id)
) 
tablespace users;


drop synonym aca;
create synonym aca for tevt_aca_actionable_attributes;

-- ===================================================================
--
-- Table tevt_ccp_calendar_cmp_pref
--

-- ===================================================================

drop table tevt_ccp_calendar_cmp_pref cascade constraints;
create table tevt_ccp_calendar_cmp_pref
( 
    ccp_company_id                number(9, 0),
    ccp_event_name                varchar2(200)
) 
tablespace users;


drop synonym ccp;
create synonym ccp for tevt_ccp_calendar_cmp_pref;




