You are here

function uc_recurring_product_schema in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_product/uc_recurring_product.install \uc_recurring_product_schema()

Implements hook_schema().

File

modules/uc_recurring_product/uc_recurring_product.install, line 11
Installs the Recurring Products module.

Code

function uc_recurring_product_schema() {
  $schema['uc_recurring_product'] = array(
    'description' => 'Data for recurring fees attached to products.',
    'fields' => array(
      'pfid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
      ),
      'model' => array(
        'description' => 'The SKU the recurring fee applies to.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '0',
      ),
      'fee_amount' => array(
        'description' => 'The amount of the recurring fee.',
        'type' => 'numeric',
        'precision' => 15,
        'scale' => 3,
        'not null' => TRUE,
        'default' => 0.0,
      ),
      'initial_charge' => array(
        'description' => 'The amount of time between checkout and the first charge.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '0',
      ),
      'regular_interval' => array(
        'description' => 'The amount of time between charges.',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
        'default' => '0',
      ),
      'number_intervals' => array(
        'description' => 'The number of times the fee should be charged.',
        'type' => 'int',
        'size' => 'small',
        'unsigned' => FALSE,
        'not null' => TRUE,
        'default' => -1,
      ),
    ),
    'primary key' => array(
      'pfid',
    ),
  );
  return $schema;
}