<?php
    // file created on January 1, 2016, 10:48 pm
    
    // field specifications for table htm.orga_mannschaften_kontakte
    $fieldspec['verbaende_art_id']          = array('type' => 'string',
                                                    'size' => 5,
                                                    'pkey' => 'y',
                                                    'required' => 'y',
                                                    'uppercase' => 'y');
    
    $fieldspec['verbaende_kuerzel']         = array('type' => 'string',
                                                    'size' => 10,
                                                    'pkey' => 'y',
                                                    'required' => 'y',
                                                    'uppercase' => 'y');
    
    $fieldspec['vereine_kuerzel']           = array('type' => 'string',
                                                    'size' => 20,
                                                    'pkey' => 'y',
                                                    'required' => 'y',
                                                    'uppercase' => 'y');
    
    $fieldspec['saison_id']                 = array('type' => 'string',
                                                    'size' => 10,
                                                    'pkey' => 'y',
                                                    'required' => 'y');
    
    $fieldspec['mannschaften_id']           = array('type' => 'string',
                                                    'size' => 10,
                                                    'pkey' => 'y',
                                                    'required' => 'y');
    
    $fieldspec['kontakt_ma_user_id']        = array('type' => 'string',
                                                    'size' => 16,
                                                    'pkey' => 'y',
                                                    'required' => 'y',
                                                    'uppercase' => 'y',
                                                    'control' => 'popup',
                                                    'task_id' => 'htm_kontakte(popup1)',
                                                    'foreign_field' => 'user_id');
    
    $fieldspec['kontakt_ma_user_seq_no']    = array('type' => 'integer',
                                                    'type_native' => 'int',
                                                    'size' => 11,
                                                    'minvalue' => 0,
                                                    'maxvalue' => 4294967295,
                                                    'pkey' => 'y',
                                                    'required' => 'y');
    
    $fieldspec['rdcaccount_id']             = array('type' => 'integer',
                                                    'type_native' => 'int',
                                                    'size' => 10,
                                                    'minvalue' => 0,
                                                    'maxvalue' => 4294967295,
                                                    'required' => 'y',
                                                    'default' => '1',
                                                    'noedit' => 'y',
                                                    'nosearch' => 'y');
    
    $fieldspec['kontakt_ma_name']           = array('type' => 'string',
                                                    'size' => 50,
                                                    'required' => 'y');
    
    $fieldspec['kontakt_ma_vorname']        = array('type' => 'string',
                                                    'size' => 50);
    
    $fieldspec['kontakt_ma_position']       = array('type' => 'string',
                                                    'size' => 3,
                                                    'control' => 'dropdown',
                                                    'optionlist' => 'kontakt_position_id');
    
    $fieldspec['kontakt_ma_trikot_no']      = array('type' => 'string',
                                                    'size' => 20);
    
    $fieldspec['kontakt_typ_id']            = array('type' => 'string',
                                                    'size' => 6,
                                                    'required' => 'y',
                                                    'control' => 'dropdown',
                                                    'optionlist' => 'kontakt_typ_id_list');
    
    $fieldspec['node_id']                   = array('type' => 'integer',
                                                    'type_native' => 'int',
                                                    'size' => 5,
                                                    'minvalue' => 0,
                                                    'maxvalue' => 4294967295,
                                                    'default' => '0');
    
    $fieldspec['created_date']              = array('type' => 'datetime',
                                                    'size' => 20,
                                                    'required' => 'y',
                                                    'default' => '2014-01-01 00:00:00',
                                                    'autoinsert' => 'y',
                                                    'noedit' => 'y',
                                                    'nosearch' => 'y');
    
    $fieldspec['created_user']              = array('type' => 'string',
                                                    'size' => 16,
                                                    'required' => 'y',
                                                    'autoinsert' => 'y',
                                                    'noedit' => 'y',
                                                    'nosearch' => 'y');
    
    $fieldspec['revised_date']              = array('type' => 'datetime',
                                                    'size' => 20,
                                                    'autoupdate' => 'y',
                                                    'noedit' => 'y',
                                                    'nosearch' => 'y');
    
    $fieldspec['revised_user']              = array('type' => 'string',
                                                    'size' => 16,
                                                    'autoupdate' => 'y',
                                                    'noedit' => 'y',
                                                    'nosearch' => 'y');
    
    // primary key details 
    $this->primary_key                      = array('verbaende_art_id',
                                                    'verbaende_kuerzel',
                                                    'vereine_kuerzel',
                                                    'saison_id',
                                                    'mannschaften_id',
                                                    'kontakt_ma_user_id',
                                                    'kontakt_ma_user_seq_no');
    
    // unique key details 
    $this->unique_keys                      = array();
    
    // child relationship details 
    $this->child_relations                  = array();
    
    // parent relationship details 
    $this->parent_relations[]               = array('parent' => 'orga_kontakte_adresse',
                                                    'fields' => array('kontakt_ma_user_id' => 'user_id',
                                                                      'kontakt_ma_user_seq_no' => 'user_seq_no',
                                                                      'rdcaccount_id' => 'rdcaccount_id'));
    
    $this->parent_relations[]               = array('parent' => 'orga_kontakte_position',
                                                    'fields' => array('kontakt_ma_position' => 'kontakt_position_id',
                                                                      'rdcaccount_id' => 'rdcaccount_id'));
    
    $this->parent_relations[]               = array('parent' => 'orga_kontakte_typ',
                                                    'fields' => array('kontakt_typ_id' => 'kontakt_typ_id',
                                                                      'rdcaccount_id' => 'rdcaccount_id'));
    
    $this->parent_relations[]               = array('parent' => 'orga_mannschaften',
                                                    'fields' => array('verbaende_art_id' => 'verbaende_art_id',
                                                                      'verbaende_kuerzel' => 'verbaende_kuerzel',
                                                                      'vereine_kuerzel' => 'vereine_kuerzel',
                                                                      'saison_id' => 'saison_id',
                                                                      'mannschaften_id' => 'mannschaften_id'));
    
    $this->parent_relations[]               = array('parent' => 'orga_mannschaften_eigene',
                                                    'parent_field' => 'mannschaften_desc',
                                                    'fields' => array('verbaende_art_id' => 'verbaende_art_id',
                                                                      'verbaende_kuerzel' => 'verbaende_kuerzel',
                                                                      'vereine_kuerzel' => 'vereine_kuerzel',
                                                                      'saison_id' => 'saison_id',
                                                                      'mannschaften_id' => 'mannschaften_id'));
    
    $this->parent_relations[]               = array('parent' => 'mnu_account',
                                                    'dbname' => 'menu',
                                                    'subsys_dir' => 'menu',
                                                    'fields' => array('rdcaccount_id' => 'rdcaccount_id'));
    
    // determines if database updates are recorded in an audit log 
    $this->audit_logging                    = TRUE;
    
    // default sort sequence 
    $this->default_orderby                  = '';
    
    // alternative language options 
    $this->alt_language_table               = '';
    $this->alt_language_cols                = '';
    
    // alias names 
    $this->nameof_start_date                = '';
    $this->nameof_end_date                  = '';
    
    // finished
?>