Subversion Repositories computer_asset_manager_v1

Rev

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

Rev Author Line No. Line
45 rodolico 1
<?php
2
global $DATABASE_DEFINITION;
3
   $DATABASE_DEFINITION['license'] = array(
4
      'display name' => 'License',
5
      'table name' => 'license',
6
      'key field' => 'license_id',
7
      'display columns' => array('Client', 'Device','Product', 'License'),
8
      'display query' => "select license_product.name 'Product', license.license 'License', device.name 'Device', client.name 'Client' from license join license_product using (license_product_id) left outer join device using (device_id) join client using ( client_id ) order by license_product.name, device.name",
9
      'field info' => array(
10
         'license_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
11
         'license_product_id' => array('type' => 'lookup', 'table' => 'license_product', 'keyfield' => 'license_product_id', 'display_field' => 'name'),
12
         'device_id' => array('type' => 'lookup', 'table' => 'device', 'keyfield' => 'device_id', 'display_field' => 'name'),
13
         'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
14
         'license' => array( 'type' => 'text' ),
15
         'removed_date' => array('type' => 'datetime', 'required' => false ),
16
         'added_date' => array('type' => 'datetime', 'required' => true),
17
      )
18
   );
19
   $DATABASE_DEFINITION['license_product'] = array(
20
      'table name' => 'license_product',
21
      'display name' => 'License Product List',
22
      'key field' => 'license_product_id',
23
      'display columns' => array('Product','Device','Task'),
24
      'display query' => "select name 'Product' from license_product",
25
      'field info' => array(
26
         'license_product_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
27
         'name' => array('type' => 'text'),
28
      )
29
   );
30
?>