merci_rro.install in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6
Install, uninstall, and schema functions for MERCI Role Rule Override
File
modules/merci_rro/merci_rro.installView source
<?php
/**
* @file
* Install, uninstall, and schema functions for MERCI Role Rule Override
*/
/**
* Implementation of hook_install().
*/
function merci_rro_install() {
drupal_install_schema('merci_rro');
}
// merci_rro_install
/**
* Implementation of hook_uninstall().
*/
function merci_rro_uninstall() {
drupal_uninstall_schema('merci_rro');
}
// merci_rro_uninstall
/**
* Implementation of hook_schema().
*/
function merci_rro_schema() {
$schema = array();
$schema['merci_rro'] = array(
'description' => t('Stores role rule overrides for content types.'),
'fields' => array(
'rid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('Foreign key for {role}.rid.'),
),
'type' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Foreign key for {node_type}.type.'),
),
'max_hours_per_reservation' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The maximum hours that the resource can be reserved for.'),
),
'allow_overnight' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'description' => t('TRUE if the resource can be kept overnight.'),
),
'allow_weekends' => array(
'type' => 'int',
'size' => 'tiny',
'not null' => TRUE,
'default' => 0,
'description' => t('TRUE if the resource can be kept over weekends.'),
),
'late_fee_per_hour' => array(
'type' => 'float',
'not null' => TRUE,
'default' => 0,
'description' => t('Per hour fee if the resource is returned late.'),
),
'rate_per_hour' => array(
'type' => 'float',
'not null' => TRUE,
'default' => 0,
'description' => t('Per hour fee for use of the resource.'),
),
'fee_free_hours' => array(
'type' => 'float',
'not null' => TRUE,
'default' => 0,
'description' => t('Number of hours the item can be used before fees are charged.'),
),
'min_cancel_hours' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('Minimum number of hours a user can cancel a reservation for the item.'),
),
'hours_mon' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Monday hours'),
),
'hours_tue' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Tuesday hours'),
),
'hours_wed' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Wednesday hours'),
),
'hours_thu' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Thursday hours'),
),
'hours_fri' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Friday hours'),
),
'hours_sat' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Saturday hours'),
),
'hours_sun' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Sunday hours'),
),
),
);
return $schema;
}
// merci_rro_schema
Functions
Name | Description |
---|---|
merci_rro_install | Implementation of hook_install(). |
merci_rro_schema | Implementation of hook_schema(). |
merci_rro_uninstall | Implementation of hook_uninstall(). |