Subversion Repositories computer_asset_manager_v2

Rev

Rev 61 | Rev 64 | 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',
                     'displayName' => 'Owner',
                     'type' => 'calculated',
                     'link' => 'location_owner_id'
                  ),
                  'location_owner_id' => array(
                     'fieldname' => 'location_owner_id',
                     'class' => 'Owner',
                     'display' => false,
                     'type' => 'calculated',
                  ),
            ) // 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'
         ) // children
      ); // dbStructure
      
/*
      public function __construct( $id ) {
         parent::__construct( $id );
         print "<pre>" . print_r( $this->data, true ) . '</pre>';
      }
*/
   } // Location

?>