Subversion Repositories computer_asset_manager_v2

Rev

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

Rev Author Line No. Line
1 rodolico 1
<?php
2
 
19 rodolico 3
/* 
4
   Auto generated from SQL script by ../library/sql2admin_hash.pl version 1.1. 
5
   do not edit this file. Edit DatabaseDefinition.local.php as changes
6
   to that file will not be overwritten by subsequent runs of this
7
   script.
8
*/
1 rodolico 9
 
10
global $DATABASE_DEFINITION; // make variable available to all scripts
11
 
12
define ( 'MAX_INPUT_FIELD_DISPLAY', 40 ); // this is the maximum input field size
13
define ( 'FILES_DIRECTORY', '/files/' );  // relative URL where pictures are stored
19 rodolico 14
define ( 'EDIT_IMAGE_HEIGHT', 100 );      // height for thumbnail of picturse
1 rodolico 15
define ( 'MAX_UPLOAD_FILE_SIZE', 1024*1024*10 ); // 10 meg
16
define ( 'DEFAULT_TEXTAREA_HEIGHT', 5 );
23 rodolico 17
define ( 'DEFAULT_TABLE', 'FILL ME IN');
1 rodolico 18
 
19
$DATABASE_DEFINITION = array(
19 rodolico 20
   '_system' => array( 
21
      'table name' => '_system',
22
      'display name' => 'System',
23
      'comment' => 'Basically a configuration file equivilent to a windows INI ',
24
      'key field' => '_system_id ',
1 rodolico 25
      'display columns' => array(
19 rodolico 26
         '_system_id',
27
         'group_name',
28
         'key_name',
29
         'theValue'
1 rodolico 30
      ),
19 rodolico 31
      'display query' => 'select _system_id,group_name,key_name,theValue from _system',
1 rodolico 32
      'field info' => array(
19 rodolico 33
         '_system_id' => array(
34
            'display name' => 'System Id' ,
1 rodolico 35
            'keyfield' => true ,
36
            'required' => true ,
37
            'readonly' => true ,
38
            'autoincrement' => true ,
39
            'type' => 'int' ,
40
            'width' => 0
41
         ),
19 rodolico 42
         'group_name' => array(
43
            'display name' => 'Group Name' ,
44
            'comment' => 'used to group keys together' ,
1 rodolico 45
            'required' => true ,
46
            'type' => 'string' ,
47
            'width' => 64
48
         ),
19 rodolico 49
         'key_name' => array(
50
            'display name' => 'Key Name' ,
51
            'comment' => 'key into this value' ,
1 rodolico 52
            'required' => true ,
19 rodolico 53
            'type' => 'string' ,
54
            'width' => 64
1 rodolico 55
         ),
19 rodolico 56
         'theValue' => array(
57
            'display name' => 'Thevalue' ,
58
            'comment' => 'the actual value of this entry' ,
59
            'required' => false ,
1 rodolico 60
            'type' => 'text' ,
61
            'width' => 0
19 rodolico 62
         )
63
      )
64
   ),
65
   '_user' => array( 
66
      'table name' => '_user',
67
      'display name' => 'User',
68
      'comment' => 'user access to program',
69
      'key field' => ' _user_id ',
70
      'display columns' => array(
71
         '_user_id',
72
         'username',
73
         'name',
74
         'email',
75
         'notes',
22 rodolico 76
         'passwd',
19 rodolico 77
         'access',
78
         'added_date',
79
         'removed_date'
80
      ),
22 rodolico 81
      'display query' => 'select _user_id,username,name,email,notes,passwd,access,added_date,removed_date from _user',
19 rodolico 82
      'field info' => array(
83
         '_user_id' => array(
84
            'display name' => 'User Id' ,
85
            'keyfield' => true ,
86
            'required' => true ,
87
            'readonly' => true ,
88
            'autoincrement' => true ,
89
            'type' => 'int' ,
90
            'width' => 0
1 rodolico 91
         ),
19 rodolico 92
         'username' => array(
93
            'display name' => 'Username' ,
94
            'comment' => 'user name for logging in' ,
95
            'required' => true ,
96
            'type' => 'string' ,
97
            'width' => 32
98
         ),
99
         'name' => array(
100
            'display name' => 'Name' ,
101
            'comment' => 'common name of user' ,
102
            'type' => 'string' ,
103
            'width' => 64
104
         ),
1 rodolico 105
         'email' => array(
106
            'display name' => 'Email' ,
19 rodolico 107
            'comment' => 'email address of user' ,
1 rodolico 108
            'type' => 'string' ,
109
            'width' => 64
110
         ),
111
         'notes' => array(
112
            'display name' => 'Notes' ,
19 rodolico 113
            'comment' => 'any notes about user' ,
1 rodolico 114
            'type' => 'text' ,
115
            'width' => 0
116
         ),
22 rodolico 117
         'passwd' => array(
118
            'display name' => 'Passwd' ,
19 rodolico 119
            'comment' => 'encrypted password of user' ,
120
            'type' => 'string' ,
121
            'width' => 256
122
         ),
123
         'access' => array(
124
            'display name' => 'Access' ,
125
            'comment' => 'sql to determine what records user can view' ,
126
            'type' => 'text' ,
127
            'width' => 0
128
         ),
129
         'added_date' => array(
130
            'display name' => 'Added Date' ,
131
            'comment' => 'Date record added to database' ,
1 rodolico 132
            'required' => true ,
19 rodolico 133
            'type' => 'date' ,
1 rodolico 134
            'width' => 0
135
         ),
19 rodolico 136
         'removed_date' => array(
137
            'display name' => 'Removed Date' ,
138
            'comment' => 'Date record marked as removed' ,
1 rodolico 139
            'required' => false ,
19 rodolico 140
            'type' => 'date' ,
1 rodolico 141
            'width' => 0
142
         )
143
      )
144
   ),
19 rodolico 145
   '_menu' => array( 
146
      'table name' => '_menu',
147
      'display name' => 'Menu',
148
      'comment' => 'We keep the entire menu structure here so modules can modify it',
149
      'key field' => '_menu_id',
1 rodolico 150
      'display columns' => array(
19 rodolico 151
         '_menu_id',
152
         'parent_id',
153
         'caption',
154
         'url'
1 rodolico 155
      ),
19 rodolico 156
      'display query' => 'select _menu_id,parent_id,caption,url from _menu',
1 rodolico 157
      'field info' => array(
19 rodolico 158
         '_menu_id' => array(
159
            'display name' => 'Menu Id' ,
1 rodolico 160
            'keyfield' => true ,
161
            'required' => true ,
162
            'readonly' => true ,
163
            'autoincrement' => true ,
164
            'type' => 'int' ,
165
            'width' => 0
166
         ),
19 rodolico 167
         'parent_id' => array(
168
            'display name' => 'Parent Id' ,
169
            'type' => 'lookup' ,
170
            'table' => '_menu' ,
171
            'keyfield' => '_menu_id' ,
172
            'display_field' => 'name'
173
         ),
174
         'caption' => array(
175
            'display name' => 'Caption' ,
176
            'comment' => 'The actual caption displayed' ,
1 rodolico 177
            'required' => true ,
178
            'type' => 'string' ,
19 rodolico 179
            'width' => 20
1 rodolico 180
         ),
19 rodolico 181
         'url' => array(
182
            'display name' => 'Url' ,
183
            'comment' => 'the url of the page/script to call or null if this contains sub-options' ,
1 rodolico 184
            'required' => false ,
19 rodolico 185
            'type' => 'string' ,
186
            'width' => 120
1 rodolico 187
         )
188
      )
189
   ),
19 rodolico 190
   'client' => array( 
191
      'table name' => 'client',
192
      'display name' => 'Client',
193
      'comment' => 'Stores information about a particlar client/owner',
194
      'key field' => 'client_id',
1 rodolico 195
      'display columns' => array(
19 rodolico 196
         'client_id',
1 rodolico 197
         'name',
198
         'notes',
22 rodolico 199
         'internal_notes',
19 rodolico 200
         'added_date',
201
         'removed_date'
1 rodolico 202
      ),
22 rodolico 203
      'display query' => 'select client_id,name,notes,internal_notes,added_date,removed_date from client',
1 rodolico 204
      'field info' => array(
19 rodolico 205
         'client_id' => array(
206
            'display name' => 'Client Id' ,
1 rodolico 207
            'keyfield' => true ,
208
            'required' => true ,
209
            'readonly' => true ,
210
            'autoincrement' => true ,
211
            'type' => 'int' ,
212
            'width' => 0
213
         ),
214
         'name' => array(
215
            'display name' => 'Name' ,
19 rodolico 216
            'comment' => 'Name of the client' ,
1 rodolico 217
            'type' => 'string' ,
218
            'width' => 64
219
         ),
220
         'notes' => array(
221
            'display name' => 'Notes' ,
19 rodolico 222
            'comment' => 'Any notes you want to enter' ,
1 rodolico 223
            'type' => 'text' ,
224
            'width' => 0
225
         ),
22 rodolico 226
         'internal_notes' => array(
227
            'display name' => 'Internal Notes' ,
228
            'comment' => 'private notes accessible only to technicians' ,
229
            'type' => 'text' ,
230
            'width' => 0
231
         ),
19 rodolico 232
         'added_date' => array(
233
            'display name' => 'Added Date' ,
234
            'comment' => 'Date record added to database' ,
1 rodolico 235
            'required' => true ,
19 rodolico 236
            'type' => 'date' ,
1 rodolico 237
            'width' => 0
238
         ),
19 rodolico 239
         'removed_date' => array(
240
            'display name' => 'Removed Date' ,
241
            'comment' => 'Date record marked as removed' ,
1 rodolico 242
            'required' => false ,
19 rodolico 243
            'type' => 'date' ,
1 rodolico 244
            'width' => 0
245
         )
246
      )
247
   ),
19 rodolico 248
   'site' => array( 
249
      'table name' => 'site',
250
      'display name' => 'Site',
251
      'comment' => 'Stores information about a particlar physical site',
252
      'key field' => 'site_id',
1 rodolico 253
      'display columns' => array(
19 rodolico 254
         'site_id',
1 rodolico 255
         'name',
256
         'notes',
19 rodolico 257
         'added_date',
258
         'removed_date'
1 rodolico 259
      ),
19 rodolico 260
      'display query' => 'select site_id,name,notes,added_date,removed_date from site',
1 rodolico 261
      'field info' => array(
19 rodolico 262
         'site_id' => array(
263
            'display name' => 'Site Id' ,
1 rodolico 264
            'keyfield' => true ,
265
            'required' => true ,
266
            'readonly' => true ,
267
            'autoincrement' => true ,
268
            'type' => 'int' ,
269
            'width' => 0
270
         ),
271
         'name' => array(
272
            'display name' => 'Name' ,
19 rodolico 273
            'comment' => 'Name of the site' ,
1 rodolico 274
            'type' => 'string' ,
275
            'width' => 64
276
         ),
277
         'notes' => array(
278
            'display name' => 'Notes' ,
19 rodolico 279
            'comment' => 'Any notes you want to enter' ,
1 rodolico 280
            'type' => 'text' ,
281
            'width' => 0
282
         ),
19 rodolico 283
         'added_date' => array(
284
            'display name' => 'Added Date' ,
285
            'comment' => 'Date record added to database' ,
1 rodolico 286
            'required' => true ,
19 rodolico 287
            'type' => 'date' ,
1 rodolico 288
            'width' => 0
289
         ),
19 rodolico 290
         'removed_date' => array(
291
            'display name' => 'Removed Date' ,
292
            'comment' => 'Date record marked as removed' ,
1 rodolico 293
            'required' => false ,
19 rodolico 294
            'type' => 'date' ,
1 rodolico 295
            'width' => 0
296
         )
297
      )
298
   ),
19 rodolico 299
   'device' => array( 
300
      'table name' => 'device',
301
      'display name' => 'Device',
302
      'comment' => 'stores information about an individual device or other device',
303
      'key field' => 'device_id',
1 rodolico 304
      'display columns' => array(
19 rodolico 305
         'device_id',
1 rodolico 306
         'name',
307
         'notes',
19 rodolico 308
         'device_type_id',
309
         'added_date',
310
         'removed_date'
1 rodolico 311
      ),
19 rodolico 312
      'display query' => 'select device_id,name,notes,device_type_id,added_date,removed_date from device',
1 rodolico 313
      'field info' => array(
19 rodolico 314
         'device_id' => array(
315
            'display name' => 'Device Id' ,
1 rodolico 316
            'keyfield' => true ,
317
            'required' => true ,
318
            'readonly' => true ,
319
            'autoincrement' => true ,
320
            'type' => 'int' ,
321
            'width' => 0
322
         ),
323
         'name' => array(
324
            'display name' => 'Name' ,
19 rodolico 325
            'comment' => 'name of the device or device' ,
22 rodolico 326
            'required' => true ,
1 rodolico 327
            'type' => 'string' ,
328
            'width' => 64
329
         ),
330
         'notes' => array(
331
            'display name' => 'Notes' ,
19 rodolico 332
            'comment' => 'any notes we want to store' ,
22 rodolico 333
            'required' => false ,
1 rodolico 334
            'type' => 'text' ,
335
            'width' => 0
336
         ),
19 rodolico 337
         'device_type_id' => array(
338
            'display name' => 'Device Type Id' ,
339
            'type' => 'lookup' ,
340
            'table' => 'device_type' ,
341
            'keyfield' => 'device_type_id' ,
342
            'display_field' => 'name'
343
         ),
344
         'added_date' => array(
345
            'display name' => 'Added Date' ,
346
            'comment' => 'Date record added to database' ,
1 rodolico 347
            'required' => true ,
19 rodolico 348
            'type' => 'date' ,
1 rodolico 349
            'width' => 0
350
         ),
19 rodolico 351
         'removed_date' => array(
352
            'display name' => 'Removed Date' ,
353
            'comment' => 'Date record marked as removed' ,
1 rodolico 354
            'required' => false ,
19 rodolico 355
            'type' => 'date' ,
1 rodolico 356
            'width' => 0
357
         )
358
      )
359
   ),
19 rodolico 360
   'device_device' => array( 
361
      'table name' => 'device_device',
362
      'display name' => 'Device Device',
363
      'comment' => 'joins device to another device',
364
      'key field' => 'device_device_id',
1 rodolico 365
      'display columns' => array(
19 rodolico 366
         'device_device_id',
23 rodolico 367
         'device_id',
368
         'parent_id',
19 rodolico 369
         'added_date',
370
         'removed_date'
1 rodolico 371
      ),
23 rodolico 372
      'display query' => 'select device_device_id,device_id,parent_id,added_date,removed_date from device_device',
1 rodolico 373
      'field info' => array(
19 rodolico 374
         'device_device_id' => array(
375
            'display name' => 'Device Device Id' ,
1 rodolico 376
            'keyfield' => true ,
377
            'required' => true ,
378
            'readonly' => true ,
379
            'autoincrement' => true ,
380
            'type' => 'int' ,
381
            'width' => 0
382
         ),
23 rodolico 383
         'device_id' => array(
384
            'display name' => 'Device Id' ,
19 rodolico 385
            'type' => 'lookup' ,
386
            'table' => 'device' ,
387
            'keyfield' => 'device_id' ,
388
            'display_field' => 'name'
1 rodolico 389
         ),
23 rodolico 390
         'parent_id' => array(
391
            'display name' => 'Parent Id' ,
19 rodolico 392
            'type' => 'lookup' ,
393
            'table' => 'device' ,
394
            'keyfield' => 'device_id' ,
395
            'display_field' => 'name'
1 rodolico 396
         ),
19 rodolico 397
         'added_date' => array(
398
            'display name' => 'Added Date' ,
399
            'comment' => 'Date record added to database' ,
1 rodolico 400
            'required' => true ,
19 rodolico 401
            'type' => 'date' ,
1 rodolico 402
            'width' => 0
403
         ),
19 rodolico 404
         'removed_date' => array(
405
            'display name' => 'Removed Date' ,
406
            'comment' => 'Date record marked as removed' ,
1 rodolico 407
            'required' => false ,
19 rodolico 408
            'type' => 'date' ,
1 rodolico 409
            'width' => 0
410
         )
411
      )
412
   ),
19 rodolico 413
   'device_type' => array( 
414
      'table name' => 'device_type',
415
      'display name' => 'Device Type',
416
      'comment' => 'simply a list of device types ie computer printer whatever',
417
      'key field' => 'device_type_id',
1 rodolico 418
      'display columns' => array(
19 rodolico 419
         'device_type_id',
1 rodolico 420
         'name',
19 rodolico 421
         'flags',
422
         'added_date',
423
         'removed_date'
1 rodolico 424
      ),
19 rodolico 425
      'display query' => 'select device_type_id,name,flags,added_date,removed_date from device_type',
1 rodolico 426
      'field info' => array(
19 rodolico 427
         'device_type_id' => array(
428
            'display name' => 'Device Type Id' ,
1 rodolico 429
            'keyfield' => true ,
430
            'required' => true ,
431
            'readonly' => true ,
432
            'autoincrement' => true ,
433
            'type' => 'int' ,
19 rodolico 434
            'width' => 10
1 rodolico 435
         ),
436
         'name' => array(
437
            'display name' => 'Name' ,
19 rodolico 438
            'comment' => 'the visible displayed name' ,
1 rodolico 439
            'required' => true ,
440
            'type' => 'string' ,
19 rodolico 441
            'width' => 64
1 rodolico 442
         ),
19 rodolico 443
         'flags' => array(
444
            'display name' => 'Flags' ,
445
            'comment' => 'flags for this device type' ,
446
            'default' => 1 ,
447
            'type' => 'int' ,
1 rodolico 448
            'width' => 0
449
         ),
19 rodolico 450
         'added_date' => array(
451
            'display name' => 'Added Date' ,
452
            'comment' => 'date record was added' ,
1 rodolico 453
            'required' => true ,
19 rodolico 454
            'type' => 'date' ,
1 rodolico 455
            'width' => 0
456
         ),
19 rodolico 457
         'removed_date' => array(
458
            'display name' => 'Removed Date' ,
459
            'comment' => 'date record was deleted/supserceded' ,
1 rodolico 460
            'required' => false ,
19 rodolico 461
            'type' => 'date' ,
1 rodolico 462
            'width' => 0
463
         )
464
      )
465
   ),
19 rodolico 466
   'alias' => array( 
467
      'table name' => 'alias',
468
      'display name' => 'Alias',
469
      'comment' => 'Allows client, site and device to have multiple names',
470
      'key field' => 'alias_id',
1 rodolico 471
      'display columns' => array(
19 rodolico 472
         'alias_id',
473
         'source',
1 rodolico 474
         'id',
19 rodolico 475
         'site',
476
         'name'
1 rodolico 477
      ),
19 rodolico 478
      'display query' => 'select alias_id,source,id,site,name from alias',
1 rodolico 479
      'field info' => array(
19 rodolico 480
         'alias_id' => array(
481
            'display name' => 'Alias Id' ,
1 rodolico 482
            'keyfield' => true ,
483
            'required' => true ,
484
            'readonly' => true ,
485
            'autoincrement' => true ,
486
            'type' => 'int' ,
487
            'width' => 0
488
         ),
19 rodolico 489
         'source' => array(
490
            'display name' => 'Source' ,
491
            'comment' => 'the table this alias comes from' ,
1 rodolico 492
            'type' => 'string' ,
493
            'width' => 64
494
         ),
19 rodolico 495
         'id' => array(
496
            'display name' => 'Id' ,
497
            'keyfield' => true ,
498
            'required' => true ,
499
            'type' => 'int' ,
1 rodolico 500
            'width' => 0
501
         ),
19 rodolico 502
         'site' => array(
503
            'display name' => 'Site' ,
504
            'type' => 'or' ,
1 rodolico 505
            'width' => 0
506
         ),
19 rodolico 507
         'name' => array(
508
            'display name' => 'Name' ,
509
            'comment' => 'the alias for the device' ,
510
            'type' => 'string' ,
511
            'width' => 64
1 rodolico 512
         )
513
      )
514
   ),
19 rodolico 515
   'client_site' => array( 
516
      'table name' => 'client_site',
517
      'display name' => 'Client Site',
518
      'comment' => 'A client owns a site',
519
      'key field' => 'client_site_id',
1 rodolico 520
      'display columns' => array(
19 rodolico 521
         'client_site_id',
522
         'client_id',
523
         'site_id',
524
         'added_date',
525
         'removed_date'
1 rodolico 526
      ),
19 rodolico 527
      'display query' => 'select client_site_id,client_id,site_id,added_date,removed_date from client_site',
1 rodolico 528
      'field info' => array(
19 rodolico 529
         'client_site_id' => array(
530
            'display name' => 'Client Site Id' ,
1 rodolico 531
            'keyfield' => true ,
532
            'required' => true ,
533
            'readonly' => true ,
534
            'autoincrement' => true ,
535
            'type' => 'int' ,
536
            'width' => 0
537
         ),
19 rodolico 538
         'client_id' => array(
539
            'display name' => 'Client Id' ,
1 rodolico 540
            'type' => 'lookup' ,
19 rodolico 541
            'table' => 'client' ,
542
            'keyfield' => 'client_id' ,
1 rodolico 543
            'display_field' => 'name'
544
         ),
19 rodolico 545
         'site_id' => array(
546
            'display name' => 'Site Id' ,
1 rodolico 547
            'type' => 'lookup' ,
19 rodolico 548
            'table' => 'site' ,
549
            'keyfield' => 'site_id' ,
1 rodolico 550
            'display_field' => 'name'
551
         ),
19 rodolico 552
         'added_date' => array(
553
            'display name' => 'Added Date' ,
554
            'comment' => 'Date record added to database' ,
1 rodolico 555
            'required' => true ,
19 rodolico 556
            'type' => 'date' ,
1 rodolico 557
            'width' => 0
558
         ),
19 rodolico 559
         'removed_date' => array(
560
            'display name' => 'Removed Date' ,
561
            'comment' => 'Date record marked as removed' ,
1 rodolico 562
            'required' => false ,
19 rodolico 563
            'type' => 'date' ,
1 rodolico 564
            'width' => 0
565
         )
566
      )
567
   ),
19 rodolico 568
   'client_device' => array( 
569
      'table name' => 'client_device',
570
      'display name' => 'Client Device',
571
      'comment' => 'Links client and device tables',
572
      'key field' => 'client_device_id',
1 rodolico 573
      'display columns' => array(
19 rodolico 574
         'client_device_id',
575
         'client_id',
1 rodolico 576
         'device_id',
19 rodolico 577
         'added_date',
578
         'removed_date'
1 rodolico 579
      ),
19 rodolico 580
      'display query' => 'select client_device_id,client_id,device_id,added_date,removed_date from client_device',
1 rodolico 581
      'field info' => array(
19 rodolico 582
         'client_device_id' => array(
583
            'display name' => 'Client Device Id' ,
1 rodolico 584
            'keyfield' => true ,
585
            'required' => true ,
586
            'readonly' => true ,
587
            'autoincrement' => true ,
588
            'type' => 'int' ,
589
            'width' => 0
590
         ),
19 rodolico 591
         'client_id' => array(
592
            'display name' => 'Client Id' ,
1 rodolico 593
            'type' => 'lookup' ,
19 rodolico 594
            'table' => 'client' ,
595
            'keyfield' => 'client_id' ,
1 rodolico 596
            'display_field' => 'name'
597
         ),
598
         'device_id' => array(
599
            'display name' => 'Device Id' ,
600
            'type' => 'lookup' ,
19 rodolico 601
            'table' => 'device' ,
602
            'keyfield' => 'device_id' ,
1 rodolico 603
            'display_field' => 'name'
604
         ),
19 rodolico 605
         'added_date' => array(
606
            'display name' => 'Added Date' ,
607
            'comment' => 'Date record added to database' ,
1 rodolico 608
            'required' => true ,
19 rodolico 609
            'type' => 'date' ,
1 rodolico 610
            'width' => 0
611
         ),
19 rodolico 612
         'removed_date' => array(
613
            'display name' => 'Removed Date' ,
614
            'comment' => 'Date record marked as removed' ,
1 rodolico 615
            'required' => false ,
19 rodolico 616
            'type' => 'date' ,
1 rodolico 617
            'width' => 0
618
         )
619
      )
620
   ),
19 rodolico 621
   'site_device' => array( 
622
      'table name' => 'site_device',
623
      'display name' => 'Site Device',
624
      'comment' => 'Links site and device tables',
625
      'key field' => ' site_device_id ',
1 rodolico 626
      'display columns' => array(
19 rodolico 627
         'site_device_id',
628
         'site_id',
629
         'device_id',
630
         'added_date',
631
         'removed_date'
1 rodolico 632
      ),
19 rodolico 633
      'display query' => 'select site_device_id,site_id,device_id,added_date,removed_date from site_device',
1 rodolico 634
      'field info' => array(
19 rodolico 635
         'site_device_id' => array(
636
            'display name' => 'Site Device Id' ,
1 rodolico 637
            'keyfield' => true ,
638
            'required' => true ,
639
            'readonly' => true ,
640
            'autoincrement' => true ,
641
            'type' => 'int' ,
642
            'width' => 0
643
         ),
19 rodolico 644
         'site_id' => array(
645
            'display name' => 'Site Id' ,
646
            'type' => 'lookup' ,
647
            'table' => 'site' ,
648
            'keyfield' => 'site_id' ,
649
            'display_field' => 'name'
650
         ),
651
         'device_id' => array(
652
            'display name' => 'Device Id' ,
653
            'type' => 'lookup' ,
654
            'table' => 'device' ,
655
            'keyfield' => 'device_id' ,
656
            'display_field' => 'name'
657
         ),
658
         'added_date' => array(
659
            'display name' => 'Added Date' ,
660
            'comment' => 'Date record added to database' ,
1 rodolico 661
            'required' => true ,
19 rodolico 662
            'type' => 'date' ,
663
            'width' => 0
1 rodolico 664
         ),
19 rodolico 665
         'removed_date' => array(
666
            'display name' => 'Removed Date' ,
667
            'comment' => 'Date record marked as removed' ,
668
            'required' => false ,
669
            'type' => 'date' ,
670
            'width' => 0
1 rodolico 671
         )
672
      )
673
   )
674
);
19 rodolico 675
include('DatabaseDefinition.local.php');
1 rodolico 676
?>