94 lines
2.3 KiB
PHP
94 lines
2.3 KiB
PHP
|
<?php
|
||
|
App::uses('AppModel', 'Model');
|
||
|
/**
|
||
|
* MicDjPageInh Model
|
||
|
*
|
||
|
*/
|
||
|
class DreamjobPageInh extends AppModel {
|
||
|
|
||
|
/**
|
||
|
* Use database config
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $useDbConfig = 'dreamjobMain';
|
||
|
|
||
|
/**
|
||
|
* Use table
|
||
|
*
|
||
|
* @var mixed False or table name
|
||
|
*/
|
||
|
public $useTable = 'mic_dj_page_inh';
|
||
|
|
||
|
/**
|
||
|
* Display field
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $displayField = 'title';
|
||
|
|
||
|
/**
|
||
|
* Validation rules
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
public $validate = array(
|
||
|
'id' => array(
|
||
|
'naturalNumber' => array(
|
||
|
'rule' => array('naturalNumber'),
|
||
|
//'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
|
||
|
),
|
||
|
),
|
||
|
'user_id' => array(
|
||
|
'naturalNumber' => array(
|
||
|
'rule' => array('naturalNumber'),
|
||
|
//'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
|
||
|
),
|
||
|
'notEmpty' => array(
|
||
|
'rule' => array('notEmpty'),
|
||
|
//'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
|
||
|
),
|
||
|
),
|
||
|
'title' => array(
|
||
|
'notEmpty' => array(
|
||
|
'rule' => array('notEmpty'),
|
||
|
//'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
|
||
|
),
|
||
|
),
|
||
|
'position' => 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
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
}
|