Rev 67 | Rev 72 | 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',
'inactiveField' => 'removed',
'fields' => array(
'id' => array (
'fieldname' => 'location_id',
'displayName' => 'ID',
'type' => 'int unsigned',
'nullable' => false,
'canEdit' => 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'
),
'owner' => array(
'fieldname' => 'owner_id',
'class' => 'Owner',
'displayName' => 'Owner',
'displayColumn' => 'name',
'type' => '1:1H',
'linkageTable' => 'owner_location',
'linkageColumn' => 'location_id',
'foreignColumn' => 'owner_id',
'foreignTable' => '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(
'intermediateTable' => 'location_device',
'remoteID' => 'device_id',
'myID' => 'location_id'
)
) // children
); // dbStructure
} // Location
?>