-- 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 tapp_req_request
--
-- This is the 'request for approval' table.
-- requester_id and approver_id are user_ids
-- the status is defined in RequestStatusEnum as:
-- - P for pending
-- - R for rejected
-- - A for accepted
-- - C for canceled
-- - N for new
-- the type is defined in RequestTypeEnum as:
-- - AGG for aggregation
-- - SYN for syndication
-- params is a pipe/colon delimited list of name=value... use Attributes Class to flatten/unflatten
-- ===================================================================

drop table tapp_req_request cascade constraints;
create table tapp_req_request
( 
    req_id                        number(9, 0),
    req_cmp_id                    number(9),
    req_requester_id              number(9, 0),
    req_approver_id               number(9, 0),
    req_request_date              date,
    req_response_date             date,
    req_request_txt               varchar2(4000),
    req_response_txt              varchar2(4000),
    req_status                    char,
    req_type                      varchar2(100),
    req_params                    varchar2(1000)
) 
tablespace users;


drop synonym req;
create synonym req for tapp_req_request;

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




