<?php
class PackingList extends AppModel {

	var $name = 'PackingList';

	// var $recursive = 2;

	var $validate = array(
		'issue_date' => array('date'),
		'title' => array('notempty'),
		'enquiry_id' => array('numeric'),
		'user_id' => array('numeric')
	);

	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
		'Enquiry' => array(
			'className' => 'Enquiry',
			'foreignKey' => 'enquiry_id',
			'counterCache'=> true
		),
		'Customer' => array(
			'className' => 'Customer',
			'foreignKey' => 'customer_id'
		),
		'Job' => array(
			'className' => 'Job',
			'foreignKey' => 'job_id'
		),
		'Currency' => array(
			'className' => 'Currency',
			'foreignKey' => 'currency_id'
		),
		'Document' => array(
			'className' => 'Document',
			'foreignKey' => 'document_id'
		)
	);

}
?>
