Subversion Repositories computer_asset_manager_v2

Rev

Rev 69 | Details | Compare with Previous | Last modification | View Log | RSS feed

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