<?php
class Contact extends AppModel {

	var $name = 'Contact';

	var $validate = array(
		'first_name' => array(
			'rule' => array('notEmpty'),
			'message' => 'Please Enter the First Name of the Contact',
			'required' => true,
			'allowEmpty' => false
			),
			
		'last_name' => array(
			'rule' => array('notEmpty'),
			'message' => 'Please Enter the Last Name of the Contact',
			'required' => true,
			'allowEmpty' => false
			),
		'email' => array(
			'rule' => array('email'),
			'message' => 'Please a valid Email Address for the Contact',
			'required' => true,
			'allowEmpty' => false
			)
		); 
			
	


	//The Associations below have been created with all possible keys, those that are not needed can be removed
	var $belongsTo = array(
			'Customer' => array('className' => 'Customer',
								'foreignKey' => 'customer_id',
								'conditions' => '',
								'fields' => '',
								'order' => ''
			),
			'ContactCategory' => array('className' => 'ContactCategory',
										'foreignKey' => 'contact_category_id')
			
	);

	var $hasMany = array(
			'Enquiry' => array('className' => 'Enquiry',
								'foreignKey' => 'contact_id',
								'dependent' => false,
								'conditions' => '',
								'fields' => '',
								'order' => '',
								'limit' => '',
								'offset' => '',
								'exclusive' => '',
								'finderQuery' => '',
								'counterQuery' => ''
			)
	);


}
?>
