/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2013 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

DECLARE
  e_obj_not_exists EXCEPTION;
  PRAGMA EXCEPTION_INIT(e_obj_not_exists, -04043);
BEGIN
  EXECUTE IMMEDIATE 'DROP TYPE XXAS_EMP_PAYSLIP_VARRAY';
  EXECUTE IMMEDIATE 'DROP TYPE XXAS_EMP_PAYSLIP_TYPE';
EXCEPTION
  WHEN e_obj_not_exists THEN
    NULL;
END;
/

CREATE OR REPLACE TYPE XXAS_EMP_PAYSLIP_TYPE AS OBJECT
  (payslip_id            number
  ,template              varchar2(400)
  ,summary_context       varchar2(4000)
  ,summary_text          varchar2(4000)
  ,summary_message       varchar2(4000)
  ,rest_api_path         varchar2(400))
/

CREATE OR REPLACE TYPE XXAS_EMP_PAYSLIP_VARRAY AS
VARRAY(100000) OF xxas_emp_payslip_type
/

COMMIT;
EXIT;
