You are here

function pmexpense_schema in Drupal PM (Project Management) 7

Implements hook_schema().

File

pmexpense/pmexpense.install, line 141
Installation file for pmexpense module.

Code

function pmexpense_schema() {
  $schema['pmexpense'] = array(
    'fields' => array(
      'vid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'nid' => array(
        'type' => 'int',
        'not null' => TRUE,
        'default' => 0,
      ),
      'organization_nid' => array(
        'type' => 'int',
      ),
      'organization_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'project_nid' => array(
        'type' => 'int',
      ),
      'project_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'task_nid' => array(
        'type' => 'int',
      ),
      'task_stepno' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'task_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'ticket_nid' => array(
        'type' => 'int',
      ),
      'ticket_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'provider_nid' => array(
        'type' => 'int',
      ),
      'provider_title' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'expensestatus' => array(
        'type' => 'varchar',
        'length' => 128,
      ),
      'amount' => array(
        'type' => 'float',
      ),
      'tax1app' => array(
        'type' => 'int',
      ),
      'tax1percent' => array(
        'type' => 'float',
      ),
      'tax1' => array(
        'type' => 'float',
      ),
      'subtotal' => array(
        'type' => 'float',
      ),
      'tax2app' => array(
        'type' => 'int',
      ),
      'tax2percent' => array(
        'type' => 'float',
      ),
      'tax2' => array(
        'type' => 'float',
      ),
      'total' => array(
        'type' => 'float',
      ),
    ),
    'primary key' => array(
      'vid',
    ),
    'indexes' => array(
      'nid' => array(
        'nid',
      ),
      'organization_nid' => array(
        'organization_nid',
      ),
      'project_nid' => array(
        'project_nid',
      ),
      'task_nid' => array(
        'task_nid',
      ),
      'ticket_nid' => array(
        'ticket_nid',
      ),
      'provider_nid' => array(
        'provider_nid',
      ),
    ),
  );
  return $schema;
}