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

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


CREATE OR REPLACE VIEW xxas_cloud_models_v AS
SELECT m.column_value as model_slug
      ,initcap(m.column_value) as model_name
FROM TABLE(xxas_cloud_sync_pkg.get_models) m;

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_CLOUD_MODELS_V'
   ,p_description            => 'Applaud Cloud Models List');
END;     
/ 

COMMIT;
EXIT;