function appointment_calendar_schema in Appointment Calendar 8
Same name and namespace in other branches
- 7 appointment_calendar.install \appointment_calendar_schema()
Implements hook_schema().
File
- ./
appointment_calendar.install, line 19 - Install and uninstall functions for the Appointment Calendar module.
Code
function appointment_calendar_schema() {
$schema['appointment_date'] = [
'description' => 'The base table for Appointment Calendar Dates.',
'fields' => [
'date' => [
'description' => 'Appointment Date',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'no_slots' => [
'description' => 'No of Time Slots for particular Day.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'slot_values' => [
'description' => 'Time Slots values for particular Day.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
],
'slot_capacity' => [
'description' => 'Time Slots Capacity for particular Day.',
'type' => 'blob',
'not null' => FALSE,
'size' => 'big',
'serialize' => TRUE,
],
],
];
$schema['appointment_slots'] = [
'description' => 'The base table for Appointment Calendar Slots.',
'fields' => [
'date' => [
'description' => 'Appointment Date',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'slot' => [
'description' => 'Time Slots for particular Day.',
'type' => 'varchar',
'length' => 60,
],
'nid' => [
'description' => 'Node ID.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
'uid' => [
'description' => 'User ID.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
],
],
];
return $schema;
}