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',
15
                     'nullable' => false
16
                  ),
17
                  'name' => array (
56 rodolico 18
                     'fieldname' => 'name',
19
                     'displayName' => 'Location',
53 rodolico 20
                     'type' => 'varchar',
21
                     'size' => 64,
22
                     'list' => true
23
                  ),
63 rodolico 24
                  'uuid' => array (
25
                     'fieldname' => 'uuid',
26
                     'displayName' => 'UUID',
27
                     'type' => 'varchar',
28
                     'size' => 36,
29
                     'list' => false
30
                  ),
53 rodolico 31
                  'created' => array (
56 rodolico 32
                     'fieldname' => 'created',
53 rodolico 33
                     'displayName' => 'Created',
34
                     'type' => 'date'
35
                  ),
36
                  'removed' => array(
56 rodolico 37
                     'fieldname' => 'removed',
53 rodolico 38
                     'displayName' => 'Removed',
39
                     'type' => 'date'
59 rodolico 40
                  ),
41
                  'location_owner' => array(
42
                     'fieldname' => 'location_owner_id',
43
                     'class' => 'Owner',
64 rodolico 44
                     'displayName' => 'Owner',
45
                     'displayColumn' => 'location_owner',
46
                     'type' => '1:1H',
65 rodolico 47
                     'linkageTable' => 'owner_location',
48
                     'linkageColumn' => 'location_id',
49
                     'foreignColumn' => 'owner_id',
50
                     'foreignTable' => 'owner'
59 rodolico 51
                  ),
53 rodolico 52
            ) // fields
56 rodolico 53
         ), // table
54
         'view' => array(
55
            'viewName' => 'view_device_location_owner_type',
56
            'primaryKey' => 'location_id',
57
            'selectionDisplay' => 'location',
58
            'fields' => array(
59
               'removed' => array( 
60
                  'fieldname' => 'location_removed'
61
               )
62
            )
59 rodolico 63
         ), // view
64
         'children' => array(
64 rodolico 65
            'Device' => array()
59 rodolico 66
         ) // children
53 rodolico 67
      ); // dbStructure
59 rodolico 68
 
69
   } // Location
53 rodolico 70
 
71
?>