<?php
include_once 'include/db_object.class.php';
class Congregation extends db_object
{
function _getFields()
{
return Array(
'name' => Array(
'type' => 'text',
'width' => 40,
'maxlength' => 128,
'allow_empty' => FALSE,
'initial_cap' => TRUE,
),
'meeting_time' => Array(
'type' => 'text',
'width' => 10,
'maxlength' => 255,
'label' => 'Code Name',
'note' => 'Used for sorting',
),
);
}
function getInitSQL()
{
return "
CREATE TABLE `congregation` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) collate latin1_general_ci NOT NULL default '',
`meeting_time` varchar(4) collate latin1_general_ci NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
";
}
function toString()
{
return $this->values['name'];
}
}
?>