<?php
App::uses('AppModel', 'Model');
/**
 * MicSysMicapp Model
 *
 * @property User $User
 * @property Mannerofaddress $Mannerofaddress
 */
class DreamjobJobFavority extends AppModel {

	public $useDbConfig = 'dreamjobMain';

	public $useTable = 'mic_dj_jobs_opening_worker';
	
		public $validate = array(
		'worker_id' => array(
			'numeric' => array(
				'rule' => array('numeric'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
			'multiple' => array(
				'rule' => array('multiple'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
		'opening_id' => array(
			'numeric' => array(
				'rule' => array('numeric'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
			'multiple' => array(
				'rule' => array('multiple'),
				//'message' => 'Your custom message here',
				//'allowEmpty' => false,
				//'required' => false,
				//'last' => false, // Stop validation after this rule
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
			),
		),
	);
	
	
	public $belongsTo = array(
		'DreamjobWorker' => array(
			'className' => 'DreamjobWorker',
			'foreignKey' => 'worker_id'
		),
		'DreamjobJobOpening' => array(
			'className' => 'DreamjobJobOpening',
			'foreignKey' => 'opening_id'
		)
	);
}