dreamjob/app/Model/DreamjobJobApplicationPage.php

88 lines
1.9 KiB
PHP
Raw Permalink Normal View History

2015-03-31 14:49:03 +02:00
<?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'
),
);
}