Subversion Repositories computer_asset_manager_v1

Rev

Rev 45 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?php
global $DATABASE_DEFINITION;
   $DATABASE_DEFINITION['license'] = array(
      'display name' => 'License',
      'table name' => 'license',
      'key field' => 'license_id',
      'display columns' => array('Client', 'Device','Product', 'License'),
      'display query' => "select license_id,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",
      'field info' => array(
         'license_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
         'license_product_id' => array('type' => 'lookup', 'table' => 'license_product', 'keyfield' => 'license_product_id', 'display_field' => 'name'),
         // following uses the view computers to limit the devices which are actually machines
         'device_id' => array('type' => 'lookup', 'table' => 'view_device_systems', 'keyfield' => 'device_id', 'display_field' => 'name', 'filter'=>"removed_date is null and device_type_id in (select device_type_id from device_type where show_as_system = 'Y'"),
         'client_id' => array('type' => 'lookup', 'table' => 'client', 'keyfield' => 'client_id', 'display_field' => 'name'),
         'license' => array( 'type' => 'text' ),
         'removed_date' => array('type' => 'datetime', 'required' => false ),
         'added_date' => array('type' => 'datetime', 'required' => true),
      )
   );
   $DATABASE_DEFINITION['license_product'] = array(
      'table name' => 'license_product',
      'display name' => 'License Product List',
      'key field' => 'license_product_id',
      'display columns' => array('Product'),
      'display query' => "select license_product_id,name 'Product' from license_product",
      'field info' => array(
         'license_product_id' => array('keyfield' => true , 'required' => true , 'readonly' => true , 'type' => 'int' , 'width' => 10),
         'name' => array('type' => 'text'),
      )
   );
?>