<?php
/**
* @version	$Id: drafts_config.php 13962 2010-09-25 18:38:45Z alex $
* @package	In-Portal
* @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
* @license      GNU/GPL
* In-Portal is Open Source software.
* This means that this software may have been modified pursuant
* the GNU General Public License, and as distributed it includes
* or is derivative of works licensed under the GNU General Public License
* or other free or open source software licenses.
* See http://www.in-portal.org/license for copyright notices and details.
*/

	defined('FULL_PATH') or die('restricted access!');

	$config = Array (
		'Prefix' => 'draft',
		'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
		'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
		'EventHandlerClass' => Array ('class' => 'DraftEventHandler', 'file' => 'draft_eh.php', 'build_event' => 'OnBuild'),
		'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),

		'AutoLoad' => true,

		'QueryString' => Array (
			1 => 'id',
			2 => 'Page',
			3 => 'event',
			4 => 'mode',
		),

		'IDField' => 'DraftId',

		'ParentPrefix' => 'formsubs',
		'ForeignKey' => 'FormSubmissionId',
		'ParentTableKey' => 'FormSubmissionId',
		'AutoDelete' => true,
		'AutoClone' => true,

		'TableName' => TABLE_PREFIX . 'Drafts',

		'TitleField' => 'DraftId',

		'ListSQLs' => Array (
			'' => '	SELECT %1$s.* %2$s FROM %1$s',
		),

		'ListSortings' => Array (
			'' => Array (
				'Sorting' => Array ('DraftId' => 'desc'),
			)
		),

		'Fields' => Array (
			'DraftId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
			'FormSubmissionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
			'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
			'CreatedById' => Array ('type' => 'int', 'default' => NULL),
			'Message' => Array ('type' => 'string', 'default' => NULL),
		),
	);