88 lines
1.9 KiB
PHP
88 lines
1.9 KiB
PHP
<?php
|
|
App::uses('AppModel', 'Model');
|
|
/**
|
|
* MicDjJobsApplicationPage Model
|
|
*
|
|
* @property Application $Application
|
|
* @property Page $Page
|
|
*/
|
|
class DreamjobJobApplicationPage extends AppModel {
|
|
|
|
/**
|
|
* Use database config
|
|
*
|
|
* @var string
|
|
*/
|
|
public $useDbConfig = 'dreamjobMain';
|
|
public $useTable = 'mic_dj_jobs_application_pages';
|
|
|
|
/**
|
|
* Primary key field
|
|
*
|
|
* @var string
|
|
*/
|
|
public $primaryKey = 'id';
|
|
/**
|
|
* Display field
|
|
*
|
|
* @var string
|
|
*/
|
|
public $displayField = 'id';
|
|
|
|
/**
|
|
* Validation rules
|
|
*
|
|
* @var array
|
|
*/
|
|
public $validate = array(
|
|
'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
|
|
),
|
|
),
|
|
'application_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
|
|
),
|
|
),
|
|
'page_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
|
|
),
|
|
),
|
|
);
|
|
|
|
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
|
|
|
/**
|
|
* belongsTo associations
|
|
*
|
|
* @var array
|
|
*/
|
|
public $belongsTo = array(
|
|
'DreamjobJobApplication' => array(
|
|
'className' => 'DreamjobJobApplication',
|
|
'foreignKey' => 'application_id'
|
|
),
|
|
'DreamjobPage' => array(
|
|
'className' => 'DreamjobPageInh',
|
|
'foreignKey' => 'page_id'
|
|
),
|
|
);
|
|
}
|