Subversion Repositories computer_asset_manager_v2

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
53 rodolico 1
<?php
2
   require_once( 'camp.class.php' );
3
 
4
   class Location extends Camp {
5
      protected static $dbStructure = array(
6
         'table' => array( 
7
            'tableName' => 'location',
8
            'primaryKey' => 'location_id',
9
            'selectionDisplay' => 'name',
10
            'fields' => array(
56 rodolico 11
                  'id' => array (
12
                     'fieldname' => 'location_id',
53 rodolico 13
                     'displayName' => 'ID',
14
                     'type' => 'int unsigned',
67 rodolico 15
                     'nullable' => false,
16
                     'canEdit' => false
53 rodolico 17
                  ),
18
                  'name' => array (
56 rodolico 19
                     'fieldname' => 'name',
20
                     'displayName' => 'Location',
53 rodolico 21
                     'type' => 'varchar',
22
                     'size' => 64,
23
                     'list' => true
24
                  ),
63 rodolico 25
                  'uuid' => array (
26
                     'fieldname' => 'uuid',
27
                     'displayName' => 'UUID',
28
                     'type' => 'varchar',
29
                     'size' => 36,
30
                     'list' => false
31
                  ),
53 rodolico 32
                  'created' => array (
56 rodolico 33
                     'fieldname' => 'created',
53 rodolico 34
                     'displayName' => 'Created',
35
                     'type' => 'date'
36
                  ),
37
                  'removed' => array(
56 rodolico 38
                     'fieldname' => 'removed',
53 rodolico 39
                     'displayName' => 'Removed',
40
                     'type' => 'date'
59 rodolico 41
                  ),
67 rodolico 42
                  'owner' => array(
43
                     'fieldname' => 'owner_id',
59 rodolico 44
                     'class' => 'Owner',
64 rodolico 45
                     'displayName' => 'Owner',
46
                     'displayColumn' => 'location_owner',
47
                     'type' => '1:1H',
65 rodolico 48
                     'linkageTable' => 'owner_location',
49
                     'linkageColumn' => 'location_id',
50
                     'foreignColumn' => 'owner_id',
51
                     'foreignTable' => 'owner'
59 rodolico 52
                  ),
53 rodolico 53
            ) // fields
56 rodolico 54
         ), // table
55
         'view' => array(
56
            'viewName' => 'view_device_location_owner_type',
57
            'primaryKey' => 'location_id',
58
            'selectionDisplay' => 'location',
59
            'fields' => array(
60
               'removed' => array( 
61
                  'fieldname' => 'location_removed'
62
               )
63
            )
59 rodolico 64
         ), // view
65
         'children' => array(
64 rodolico 66
            'Device' => array()
59 rodolico 67
         ) // children
53 rodolico 68
      ); // dbStructure
59 rodolico 69
 
70
   } // Location
53 rodolico 71
 
72
?>