104 lines
2.3 KiB
PHP
104 lines
2.3 KiB
PHP
|
<?php
|
||
|
App::uses('AppModel', 'Model');
|
||
|
/**
|
||
|
* DreamjobUser Model
|
||
|
*
|
||
|
* TODO
|
||
|
*
|
||
|
* @property MicapplicationPtr $MicapplicationPtr
|
||
|
*/
|
||
|
class DreamjobUser extends AppModel {
|
||
|
|
||
|
/**
|
||
|
* Use database config
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $useDbConfig = 'dreamjobMain';
|
||
|
|
||
|
/**
|
||
|
* Use table
|
||
|
*
|
||
|
* @var mixed False or table name
|
||
|
*/
|
||
|
public $useTable = 'mic_dj_account_acc';
|
||
|
|
||
|
/**
|
||
|
* Primary key field
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $primaryKey = 'micapplication_ptr_id';
|
||
|
|
||
|
/**
|
||
|
* Display field
|
||
|
*
|
||
|
* @var string
|
||
|
*/
|
||
|
public $displayField = 'micapplication_ptr_id';
|
||
|
|
||
|
/**
|
||
|
* Validation rules
|
||
|
*
|
||
|
* @var array
|
||
|
*/
|
||
|
public $validate = array(
|
||
|
'micapplication_ptr_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
|
||
|
),
|
||
|
),
|
||
|
'street' => 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
|
||
|
),
|
||
|
),
|
||
|
'city' => 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
|
||
|
),
|
||
|
),
|
||
|
'postcode' => 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
|
||
|
),
|
||
|
),
|
||
|
);
|
||
|
|
||
|
|
||
|
public $hasOne = array(
|
||
|
'AppUser' => array(
|
||
|
'className' => 'AppUser',
|
||
|
'foreignKey' => 'id'
|
||
|
)
|
||
|
);
|
||
|
}
|