/* $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

  l_TABLE_NAME   CONSTANT fnd_tables.table_name%TYPE := 'XXAS_NOTES';
  l_TRANS_TABLE  CONSTANT varchar2(1) := 'T';
  l_SEED_TABLE   CONSTANT varchar2(1) := 'S';
  l_DEF_NUM_LEN  CONSTANT number      := 38;
  l_DEF_DATE_LEN CONSTANT number      := 9;

BEGIN

  -- 
  -- Register the XXAS_NOTES table and columns
  --
  ad_dd.register_table
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_tab_type        => l_TRANS_TABLE);

  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'NOTE_ID'
    ,p_col_seq         => '1'
    ,p_col_type        => 'NUMBER'
    ,p_col_width       => l_DEF_NUM_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'ASSIGNMENT_ID'
    ,p_col_seq         => '2'
    ,p_col_type        => 'NUMBER'
    ,p_col_width       => l_DEF_NUM_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'TYPE_CODE'
    ,p_col_seq         => '3'
    ,p_col_type        => 'VARCHAR2'
    ,p_col_width       => 30
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'CONTENT'
    ,p_col_seq         => '4'
    ,p_col_type        => 'VARCHAR2'
    ,p_col_width       => 4000
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'CREATED_BY'
    ,p_col_seq         => '5'
    ,p_col_type        => 'NUMBER'
    ,p_col_width       => l_DEF_NUM_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 

  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'CREATION_DATE'
    ,p_col_seq         => '6'
    ,p_col_type        => 'DATE'
    ,p_col_width       => l_DEF_DATE_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N');
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'LAST_UPDATE_DATE'
    ,p_col_seq         => '7'
    ,p_col_type        => 'DATE'
    ,p_col_width       => l_DEF_DATE_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
  
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'LAST_UPDATED_BY'
    ,p_col_seq         => '8'
    ,p_col_type        => 'NUMBER'
    ,p_col_width       => l_DEF_NUM_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N'); 
    
  ad_dd.register_column
    (p_appl_short_name => xxas_util_pkg.app
    ,p_tab_name        => l_TABLE_NAME
    ,p_col_name        => 'LAST_UPDATE_LOGIN'
    ,p_col_seq         => '9'
    ,p_col_type        => 'NUMBER'
    ,p_col_width       => l_DEF_NUM_LEN
    ,p_nullable        => 'N'
    ,p_translate       => 'N');
  
END;
/
COMMIT;
EXIT;
