dreamjob/app/Model/AppUser.php

85 lines
1.8 KiB
PHP
Raw Normal View History

2014-02-18 12:10:29 +01:00
<?php
App::uses('AppModel', 'Model');
/**
* MicSysMicapp Model
*
* @property User $User
* @property Mannerofaddress $Mannerofaddress
*/
class AppUser extends AppModel {
/**
* Use database config
*
* @var string
*/
public $useDbConfig = 'dreamjobMain';
/**
* Use table
*
* @var mixed False or table name
*/
public $useTable = 'mic_sys_micapp';
/**
* Display field
*
* @var string
*/
public $displayField = 'id';
/**
* 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
),
),
'user_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
),
),
'take_systemwide' => array(
'boolean' => array(
'rule' => array('boolean'),
//'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(
'User' => array(
'className' => 'User',
'foreignKey' => 'user_id'
),
'Mannerofaddress' => array(
'className' => 'Mannerofaddress',
'foreignKey' => 'mannerofaddress_id',
'conditions' => '',
'fields' => '',
'order' => ''
)
);
}