Subversion Repositories computer_asset_manager_v2

Rev

Rev 63 | Rev 65 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?php
   require_once( 'camp.class.php' );

   class Location extends Camp {
      protected static $dbStructure = array(
         'table' => array( 
            'tableName' => 'location',
            'primaryKey' => 'location_id',
            'selectionDisplay' => 'name',
            'fields' => array(
                  'id' => array (
                     'fieldname' => 'location_id',
                     'displayName' => 'ID',
                     'type' => 'int unsigned',
                     'nullable' => false
                  ),
                  'name' => array (
                     'fieldname' => 'name',
                     'displayName' => 'Location',
                     'type' => 'varchar',
                     'size' => 64,
                     'list' => true
                  ),
                  'uuid' => array (
                     'fieldname' => 'uuid',
                     'displayName' => 'UUID',
                     'type' => 'varchar',
                     'size' => 36,
                     'list' => false
                  ),
                  'created' => array (
                     'fieldname' => 'created',
                     'displayName' => 'Created',
                     'type' => 'date'
                  ),
                  'removed' => array(
                     'fieldname' => 'removed',
                     'displayName' => 'Removed',
                     'type' => 'date'
                  ),
                  'location_owner' => array(
                     'fieldname' => 'location_owner_id',
                     'class' => 'Owner',
                     'displayName' => 'Owner',
                     'displayColumn' => 'location_owner',
                     'type' => '1:1H',
                     'linkage_table' => 'owner_location',
                     'linkage_column' => 'location_id',
                     'foreign_column' => 'owner_id',
                     'foreign_table' => 'owner'
                  ),
            ) // fields
         ), // table
         'view' => array(
            'viewName' => 'view_device_location_owner_type',
            'primaryKey' => 'location_id',
            'selectionDisplay' => 'location',
            'fields' => array(
               'removed' => array( 
                  'fieldname' => 'location_removed'
               )
            )
         ), // view
         'children' => array(
            'Device' => array()
         ) // children
      ); // dbStructure
      
   } // Location

?>