You are here

function commerce_reports_tax_schema in Commerce Reporting 7

Same name and namespace in other branches
  1. 7.4 modules/tax/commerce_reports_tax.install \commerce_reports_tax_schema()
  2. 7.2 modules/tax/commerce_reports_tax.install \commerce_reports_tax_schema()
  3. 7.3 modules/tax/commerce_reports_tax.install \commerce_reports_tax_schema()

Implements hook_field_schema()

File

commerce_reports_tax/commerce_reports_tax.install, line 9

Code

function commerce_reports_tax_schema() {
  $schema = array();
  $schema['commerce_reports_tax'] = array(
    'description' => 'Cache information about tax on sales.',
    'fields' => array(
      'order_id' => array(
        'description' => 'Order ID.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'created' => array(
        'description' => 'Order created timestamp.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'currency_code' => array(
        'description' => 'The currency of the taxes collected, as per the currency of the total order amount.',
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'order_id',
    ),
  );
  return $schema;
}