function __construct()
 {
     $this->season_so = CreateObject('booking.soseason');
     $this->resource_so = CreateObject('booking.soresource');
     $this->customer_id = CreateObject('booking.customer_identifier');
     parent::__construct('bb_completed_reservation', array('id' => array('type' => 'int'), 'reservation_type' => array('type' => 'string', 'required' => True, 'nullable' => False), 'reservation_id' => array('type' => 'int', 'required' => True, 'nullable' => False), 'season_id' => array('type' => 'int'), 'cost' => array('type' => 'decimal', 'required' => true), 'from_' => array('type' => 'timestamp', 'required' => true), 'to_' => array('type' => 'timestamp', 'required' => true), 'organization_id' => array('type' => 'int'), 'customer_type' => array('type' => 'string', 'nullable' => False), 'customer_identifier_type' => array('type' => 'string', 'required' => False), 'customer_organization_number' => array('type' => 'string', 'precision' => '9', 'sf_validator' => createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), array('invalid' => '%field% is invalid'))), 'customer_ssn' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianSSN')), 'exported' => array('type' => 'int'), 'description' => array('type' => 'string', 'required' => True, 'nullable' => False), 'article_description' => array('type' => 'string', 'required' => True, 'nullable' => False, 'precision' => 35), 'building_id' => array('type' => 'string', 'required' => True), 'building_name' => array('type' => 'string', 'required' => True), 'export_file_id' => array('type' => 'int'), 'invoice_file_order_id' => array('type' => 'string'), 'season_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'name')), 'organization_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'name')), 'resources' => array('type' => 'int', 'required' => True, 'manytomany' => array('table' => 'bb_completed_reservation_resource', 'key' => 'completed_reservation_id', 'column' => 'resource_id'))));
 }
 function __construct()
 {
     $this->file_storage = CreateObject('booking.filestorage', $this);
     $this->so_completed_reservation = CreateObject('booking.socompleted_reservation');
     $this->so_completed_reservation_export = CreateObject('booking.socompleted_reservation_export');
     parent::__construct('bb_completed_reservation_export_file', array('id' => array('type' => 'int'), 'type' => array('type' => 'string', 'required' => true, 'query' => true), 'filename' => array('type' => 'string'), 'log_filename' => array('type' => 'string'), 'total_cost' => array('type' => 'decimal', 'required' => true), 'total_items' => array('type' => 'int', 'required' => true), key(booking_socommon::$AUTO_CREATED_ON) => current(booking_socommon::$AUTO_CREATED_ON), key(booking_socommon::$AUTO_CREATED_BY) => current(booking_socommon::$AUTO_CREATED_BY), 'created_by_name' => booking_socommon::$REL_CREATED_BY_NAME));
 }
 function __construct()
 {
     $this->object_type = substr(get_class($this), 21);
     $table_def = array('id' => array('type' => 'int'), 'subject_id' => array('type' => 'int', 'required' => true), 'object_id' => array('type' => 'int', 'required' => true), 'object_type' => array('type' => 'string'), 'role' => array('type' => 'string', 'required' => true, 'query' => true), 'subject_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'phpgw_accounts', 'fkey' => 'subject_id', 'key' => 'account_id', 'column' => 'account_lid')));
     if (is_array($object_relations = $this->build_object_relations())) {
         $table_def = array_merge($table_def, $object_relations);
     }
     parent::__construct('bb_permission', $table_def);
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
 function __construct()
 {
     parent::__construct('bb_documentation', array('id' => array('type' => 'int'), 'name' => array('type' => 'string', 'query' => true), 'category' => array('type' => 'string', 'required' => true), 'description' => array('type' => 'string', 'required' => false)));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
     $server_files_dir = $this->_chomp_dir_sep($GLOBALS['phpgw_info']['server']['files_dir']);
     if (!file_exists($server_files_dir) || !is_dir($server_files_dir)) {
         throw new LogicException('The upload directory is not properly configured: ' . $server_files_dir);
     }
     if (!is_writable($server_files_dir)) {
         throw new LogicException('The upload directory is not writable');
     }
     $this->uploadRootDir = $server_files_dir . DIRECTORY_SEPARATOR . 'booking';
 }
 function __construct()
 {
     $this->event_so = CreateObject('booking.soevent');
     $this->allocation_bo = CreateObject('booking.boallocation');
     $this->booking_bo = CreateObject('booking.bobooking');
     $this->event_bo = CreateObject('booking.boevent');
     $this->organization_bo = CreateObject('booking.boorganization');
     $this->customer_id = CreateObject('booking.customer_identifier');
     $this->completed_reservation_so = CreateObject('booking.socompleted_reservation');
     $this->completed_reservation_bo = CreateObject('booking.bocompleted_reservation');
     $this->account_code_set_so = CreateObject('booking.soaccount_code_set');
     $this->sequential_number_generator_so = CreateObject('booking.sobilling_sequential_number_generator');
     parent::__construct('bb_completed_reservation_export', array('id' => array('type' => 'int'), 'season_id' => array('type' => 'int'), 'building_id' => array('type' => 'int'), 'from_' => array('type' => 'timestamp', 'required' => true), 'to_' => array('type' => 'timestamp', 'required' => true), 'total_cost' => array('type' => 'decimal'), 'total_items' => array('type' => 'int'), key(booking_socommon::$AUTO_CREATED_ON) => current(booking_socommon::$AUTO_CREATED_ON), key(booking_socommon::$AUTO_CREATED_BY) => current(booking_socommon::$AUTO_CREATED_BY), 'created_by_name' => booking_socommon::$REL_CREATED_BY_NAME, 'season_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'name')), 'building_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_building', 'fkey' => 'building_id', 'key' => 'id', 'column' => 'name')), 'export_configurations' => array('manytomany' => array('table' => 'bb_completed_reservation_export_configuration', 'key' => 'export_id', 'column' => array('id' => array('type' => 'int'), 'type' => array('type' => 'string', 'required' => true), 'account_code_set_id' => array('type' => 'int', 'required' => true), 'export_file_id' => array('type' => 'int'))))));
 }
 function __construct()
 {
     $this->ownerType = substr(get_class($this), 19);
     parent::__construct(sprintf('bb_document_%s', $this->get_owner_type()), array('id' => array('type' => 'int'), 'name' => array('type' => 'string', 'query' => true), 'owner_id' => array('type' => 'int', 'required' => true), 'category' => array('type' => 'string', 'required' => true), 'description' => array('type' => 'string', 'required' => false), 'owner_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => sprintf('bb_%s', $this->get_owner_type()), 'fkey' => 'owner_id', 'key' => 'id', 'column' => 'name'))));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
     $server_files_dir = $this->_chomp_dir_sep($GLOBALS['phpgw_info']['server']['files_dir']);
     if (!file_exists($server_files_dir) || !is_dir($server_files_dir)) {
         throw new LogicException('The upload directory is not properly configured: ' . $server_files_dir);
     }
     if (!is_writable($server_files_dir)) {
         throw new LogicException('The upload directory is not writable');
     }
     $this->uploadRootDir = $server_files_dir . DIRECTORY_SEPARATOR . 'booking';
 }
 function __construct()
 {
     parent::__construct('bb_contact_person', array('id' => array('type' => 'auto', 'nullable' => false), 'ssn' => array('type' => 'varchar', 'precision' => '12', 'nullable' => True), 'name' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False, 'query' => true), 'homepage' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False), 'phone' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False, 'default' => ''), 'email' => array('type' => 'varchar', 'precision' => '50', 'nullable' => False, 'default' => ''), 'description' => array('type' => 'varchar', 'precision' => '1000', 'nullable' => False, 'default' => '')));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
 function __construct()
 {
     $this->season_so = CreateObject('booking.soseason');
     $this->resource_so = CreateObject('booking.soresource');
     parent::__construct('bb_account_code_set', array('id' => array('type' => 'int'), 'name' => array('type' => 'string', 'required' => True, 'query' => True), 'object_number' => array('type' => 'string', 'required' => True, 'nullable' => False), 'responsible_code' => array('type' => 'string', 'required' => True, 'nullable' => False), 'article' => array('type' => 'string', 'required' => True, 'nullable' => False), 'service' => array('type' => 'string', 'required' => True, 'nullable' => False), 'project_number' => array('type' => 'string', 'required' => True, 'nullable' => False), 'unit_number' => array('type' => 'string', 'required' => True, 'nullable' => False), 'unit_prefix' => array('type' => 'string', 'required' => True, 'nullable' => False), 'dim_4' => array('type' => 'string', 'required' => False, 'nullable' => True), 'dim_value_4' => array('type' => 'string', 'required' => False, 'nullable' => True), 'dim_value_5' => array('type' => 'string', 'required' => False, 'nullable' => True), 'invoice_instruction' => array('type' => 'string'), 'active' => array('type' => 'int')));
 }
 function __construct()
 {
     parent::__construct('bb_organization_contact', array('id' => array('type' => 'int'), 'organization_id' => array('type' => 'int', 'required' => True), 'name' => array('type' => 'string', 'required' => True, 'query' => True), 'ssn' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianSSN')), 'email' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% contains an invalid email'))), 'phone' => array('type' => 'string')));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
Ejemplo n.º 10
0
 function __construct()
 {
     parent::__construct('bb_group', array('id' => array('type' => 'int'), 'active' => array('type' => 'int', 'required' => true), 'show_in_portal' => array('type' => 'int', 'required' => true), 'organization_id' => array('type' => 'int', 'required' => true), 'shortname' => array('type' => 'string', 'required' => False, 'query' => True), 'description' => array('type' => 'string', 'query' => true, 'required' => false), 'name' => array('type' => 'string', 'query' => true, 'required' => true), 'activity_id' => array('type' => 'int', 'required' => true), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name')), 'organization_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'name')), 'contacts' => array('type' => 'string', 'manytomany' => array('table' => 'bb_group_contact', 'key' => 'group_id', 'column' => array('name', 'email' => array('sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% contains an invalid email'))), 'phone')))));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
Ejemplo n.º 11
0
 function __construct()
 {
     parent::__construct('bb_wtemplate_alloc', array('id' => array('type' => 'int'), 'organization_id' => array('type' => 'int', 'required' => true), 'season_id' => array('type' => 'int', 'required' => true), 'cost' => array('type' => 'decimal', 'required' => true), 'wday' => array('type' => 'int', 'required' => true), 'from_' => array('type' => 'time', 'required' => true), 'to_' => array('type' => 'time', 'required' => true), 'organization_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'name')), 'shortname' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'shortname')), 'resources' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_wtemplate_alloc_resource', 'key' => 'allocation_id', 'column' => 'resource_id'))));
 }
 function __construct()
 {
     parent::__construct('bb_application_association', array('id' => array('type' => 'int'), 'application_id' => array('type' => 'int'), 'type' => array('type' => 'string', 'required' => true), 'from_' => array('type' => 'timestamp', 'query' => true), 'to_' => array('type' => 'timestamp'), 'active' => array('type' => 'int')));
 }
Ejemplo n.º 13
0
 function __construct()
 {
     parent::__construct('bb_building', array('id' => array('type' => 'int'), 'name' => array('type' => 'string', 'query' => true, 'required' => true), 'homepage' => array('type' => 'string'), 'calendar_text' => array('type' => 'string'), 'description' => array('type' => 'string'), 'phone' => array('type' => 'string'), 'email' => array('type' => 'string'), 'tilsyn_name' => array('type' => 'string'), 'tilsyn_phone' => array('type' => 'string'), 'tilsyn_email' => array('type' => 'string'), 'tilsyn_name2' => array('type' => 'string'), 'tilsyn_phone2' => array('type' => 'string'), 'tilsyn_email2' => array('type' => 'string'), 'deactivate_calendar' => array('type' => 'int'), 'deactivate_application' => array('type' => 'int'), 'deactivate_sendmessage' => array('type' => 'int'), 'extra_kalendar' => array('type' => 'int'), 'location_code' => array('type' => 'string', 'required' => false), 'street' => array('type' => 'string', 'query' => true), 'zip_code' => array('type' => 'string'), 'district' => array('type' => 'string', 'query' => true), 'city' => array('type' => 'string', 'query' => true), 'active' => array('type' => 'int')));
 }
 function __construct()
 {
     parent::__construct('bb_permission_root', array('id' => array('type' => 'int'), 'subject_id' => array('type' => 'int', 'required' => true), 'role' => array('type' => 'string', 'required' => true, 'query' => true), 'subject_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'phpgw_accounts', 'fkey' => 'subject_id', 'key' => 'account_id', 'column' => 'account_lid'))));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
 function __construct()
 {
     parent::__construct('bb_organization', array('id' => array('type' => 'int'), 'organization_number' => array('type' => 'string', 'query' => true, 'sf_validator' => createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), array('invalid' => '%field% is invalid'))), 'name' => array('type' => 'string', 'required' => True, 'query' => True), 'shortname' => array('type' => 'string', 'required' => False, 'query' => True), 'homepage' => array('type' => 'string', 'required' => False, 'query' => True), 'phone' => array('type' => 'string'), 'email' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% is invalid'))), 'description' => array('type' => 'string'), 'street' => array('type' => 'string'), 'zip_code' => array('type' => 'string'), 'district' => array('type' => 'string'), 'city' => array('type' => 'string'), 'active' => array('type' => 'int', 'required' => true), 'show_in_portal' => array('type' => 'int', 'required' => true), 'activity_id' => array('type' => 'int', 'required' => true), 'customer_identifier_type' => array('type' => 'string', 'required' => False), 'customer_number' => array('type' => 'string', 'required' => False), 'customer_ssn' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianSSN'), 'required' => false), 'customer_organization_number' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), array('invalid' => '%field% is invalid'))), 'customer_internal' => array('type' => 'int', 'required' => true), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name')), 'contacts' => array('type' => 'string', 'manytomany' => array('table' => 'bb_organization_contact', 'key' => 'organization_id', 'column' => array('name', 'ssn' => array('sf_validator' => createObject('booking.sfValidatorNorwegianSSN')), 'email' => array('sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% contains an invalid email'))), 'phone')))));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
 function __construct()
 {
     parent::__construct('bb_building', array('id' => array('type' => 'int'), 'name' => array('type' => 'string', 'query' => true, 'required' => true), 'homepage' => array('type' => 'string'), 'description' => array('type' => 'string'), 'phone' => array('type' => 'string'), 'email' => array('type' => 'string'), 'location_code' => array('type' => 'string', 'required' => false), 'street' => array('type' => 'string', 'query' => true), 'zip_code' => array('type' => 'string'), 'district' => array('type' => 'string', 'query' => true), 'city' => array('type' => 'string', 'query' => true), 'active' => array('type' => 'int')));
 }
Ejemplo n.º 17
0
 function __construct()
 {
     parent::__construct('bb_booking', array('id' => array('type' => 'int'), 'active' => array('type' => 'int', 'required' => true), 'allocation_id' => array('type' => 'int', 'required' => false), 'application_id' => array('type' => 'int', 'required' => false), 'activity_id' => array('type' => 'int', 'required' => true), 'building_name' => array('type' => 'string', 'required' => true, 'query' => true), 'group_id' => array('type' => 'int', 'required' => true), 'from_' => array('type' => 'timestamp', 'required' => true), 'to_' => array('type' => 'timestamp', 'required' => true), 'season_id' => array('type' => 'int', 'required' => true), 'cost' => array('type' => 'decimal', 'required' => true), 'sms_total' => array('type' => 'int', 'required' => false), 'completed' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '0'), 'reminder' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '1'), 'secret' => array('type' => 'string', 'required' => true), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name')), 'group_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_group', 'fkey' => 'group_id', 'key' => 'id', 'column' => 'name')), 'group_shortname' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_group', 'fkey' => 'group_id', 'key' => 'id', 'column' => 'shortname')), 'building_id' => array('type' => 'string', 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'building_id')), 'season_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'name')), 'audience' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_booking_targetaudience', 'key' => 'booking_id', 'column' => 'targetaudience_id')), 'agegroups' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_booking_agegroup', 'key' => 'booking_id', 'column' => array('agegroup_id' => array('type' => 'int', 'required' => true), 'male' => array('type' => 'int', 'required' => true), 'female' => array('type' => 'int', 'required' => true)))), 'resources' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_booking_resource', 'key' => 'booking_id', 'column' => 'resource_id'))));
 }
 function __construct()
 {
     parent::__construct('bb_system_message_association', array('id' => array('type' => 'int'), 'building_id' => array('type' => 'int'), 'type' => array('type' => 'string', 'required' => true), 'status' => array('type' => 'string', 'required' => true)));
 }
 function __construct()
 {
     parent::__construct('bb_allocation', array('id' => array('type' => 'int'), 'id_string' => array('type' => 'string', 'required' => false, 'default' => '0', 'query' => true), 'active' => array('type' => 'int', 'required' => true), 'application_id' => array('type' => 'int', 'required' => false), 'organization_id' => array('type' => 'int', 'required' => true), 'building_name' => array('type' => 'string', 'required' => true, 'query' => true), 'season_id' => array('type' => 'int', 'required' => 'true'), 'from_' => array('type' => 'string', 'required' => true), 'to_' => array('type' => 'string', 'required' => true), 'cost' => array('type' => 'decimal', 'required' => true), 'completed' => array('type' => 'int', 'required' => true, 'default' => '0'), 'organization_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'name')), 'organization_shortname' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_organization', 'fkey' => 'organization_id', 'key' => 'id', 'column' => 'shortname')), 'building_id' => array('type' => 'string', 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'building_id')), 'season_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_season', 'fkey' => 'season_id', 'key' => 'id', 'column' => 'name')), 'resources' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_allocation_resource', 'key' => 'allocation_id', 'column' => 'resource_id'))));
 }
 function __construct()
 {
     //CREATE VIEW bb_document_view AS SELECT bb_document.id AS id,bb_document.name AS name,bb_document.owner_id AS owner_id,bb_document.category AS category,bb_document.description AS description,bb_document.type AS type FROM ((SELECT *, 'building' as type from bb_document_building) UNION ALL (SELECT *, 'resource' as type from bb_document_resource)) as bb_document;
     parent::__construct('bb_document_view', array('id' => array('type' => 'string', 'expression' => '%%table%%.type || \'::\' || %%table%%.id'), 'type' => array('type' => 'string'), 'name' => array('type' => 'string', 'query' => true), 'owner_id' => array('type' => 'int', 'required' => true), 'category' => array('type' => 'string', 'required' => true), 'description' => array('type' => 'string', 'required' => false)));
 }
Ejemplo n.º 21
0
 function __construct()
 {
     parent::__construct('bb_activity', array('id' => array('type' => 'int'), 'parent_id' => array('type' => 'int', 'required' => false), 'name' => array('type' => 'string', 'query' => true, 'required' => true), 'description' => array('type' => 'string', 'query' => true), 'active' => array('type' => 'int', 'required' => true)));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
Ejemplo n.º 22
0
 function __construct()
 {
     parent::__construct('bb_resource', array('id' => array('type' => 'int'), 'active' => array('type' => 'int', 'required' => true), 'sort' => array('type' => 'int', 'required' => false), 'building_id' => array('type' => 'int', 'required' => true), 'name' => array('type' => 'string', 'query' => true, 'required' => true), 'type' => array('type' => 'string', 'query' => true, 'required' => true), 'description' => array('type' => 'string', 'query' => true, 'required' => false), 'activity_id' => array('type' => 'int', 'required' => false), 'organizations_ids' => array('type' => 'string'), 'building_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_building', 'fkey' => 'building_id', 'key' => 'id', 'column' => 'name')), 'building_street' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_building', 'fkey' => 'building_id', 'key' => 'id', 'column' => 'street')), 'building_city' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_building', 'fkey' => 'building_id', 'key' => 'id', 'column' => 'city')), 'building_district' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_building', 'fkey' => 'building_id', 'key' => 'id', 'column' => 'district')), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name'))));
     $this->account = $GLOBALS['phpgw_info']['user']['account_id'];
 }
Ejemplo n.º 23
0
 function __construct()
 {
     parent::__construct('bb_event', array('id' => array('type' => 'int'), 'id_string' => array('type' => 'string', 'required' => false, 'default' => '0', 'query' => true), 'active' => array('type' => 'int', 'required' => true), 'activity_id' => array('type' => 'int', 'required' => true), 'application_id' => array('type' => 'int', 'required' => false), 'description' => array('type' => 'string', 'required' => true, 'query' => true), 'building_id' => array('type' => 'int', 'required' => true), 'building_name' => array('type' => 'string', 'required' => true, 'query' => true), 'from_' => array('type' => 'string', 'required' => true), 'to_' => array('type' => 'string', 'required' => true), 'cost' => array('type' => 'decimal', 'required' => true), 'contact_name' => array('type' => 'string', 'required' => true, 'query' => true), 'contact_email' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorEmail', array(), array('invalid' => '%field% is invalid'))), 'contact_phone' => array('type' => 'string'), 'completed' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '0'), 'reminder' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '1'), 'is_public' => array('type' => 'int', 'required' => true, 'nullable' => false, 'default' => '1'), 'secret' => array('type' => 'string', 'required' => true), 'sms_total' => array('type' => 'int', 'required' => false), 'customer_organization_name' => array('type' => 'string', 'required' => False, 'query' => true), 'customer_organization_id' => array('type' => 'int', 'required' => False), 'customer_identifier_type' => array('type' => 'string', 'required' => False), 'customer_ssn' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianSSN'), 'required' => false), 'customer_organization_number' => array('type' => 'string', 'sf_validator' => createObject('booking.sfValidatorNorwegianOrganizationNumber', array(), array('invalid' => '%field% is invalid'))), 'customer_internal' => array('type' => 'int', 'required' => true), 'activity_name' => array('type' => 'string', 'query' => true, 'join' => array('table' => 'bb_activity', 'fkey' => 'activity_id', 'key' => 'id', 'column' => 'name')), 'audience' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_targetaudience', 'key' => 'event_id', 'column' => 'targetaudience_id')), 'agegroups' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_agegroup', 'key' => 'event_id', 'column' => array('agegroup_id' => array('type' => 'int', 'required' => true), 'male' => array('type' => 'int', 'required' => true), 'female' => array('type' => 'int', 'required' => true)))), 'comments' => array('type' => 'string', 'manytomany' => array('table' => 'bb_event_comment', 'key' => 'event_id', 'column' => array('time', 'author', 'comment', 'type'), 'order' => array('sort' => 'time', 'dir' => 'ASC'))), 'resources' => array('type' => 'int', 'required' => true, 'manytomany' => array('table' => 'bb_event_resource', 'key' => 'event_id', 'column' => 'resource_id')), 'dates' => array('type' => 'timestamp', 'manytomany' => array('table' => 'bb_event_date', 'key' => 'event_id', 'column' => array('from_', 'to_', 'id')))));
 }
 function __construct()
 {
     $this->season_so = CreateObject('booking.soseason');
     $this->resource_so = CreateObject('booking.soresource');
     parent::__construct('bb_billing_sequential_number_generator', array('id' => array('type' => 'int'), 'value' => array('type' => 'int', 'required' => true)));
 }