dreamjob/app/Model/DreamjobService.php

76 lines
1.6 KiB
PHP
Raw Permalink Normal View History

2015-03-31 14:49:03 +02:00
<?php
App::uses('AppModel', 'Model');
/**
* DreamjobListCity Model
*
*/
class DreamjobService extends AppModel {
/**
* Use database config
*
* @var string
*/
public $useDbConfig = 'dreamjobMain';
/**
* Use table
*
* @var mixed False or table name
*/
public $useTable = 'mic_dj_service';
/**
* Display field
*
* @var string
*/
public $displayField = 'title';
public $order = 'DreamjobService.title';
/**
* Validation rules
*
* @var array
*/
public $validate = array(
'id' => array(
'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
),
'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
),
),
'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
)
),
);
public $belongsTo = array(
'Category' => array(
'className' => 'DreamjobServiceCategory',
'foreignKey' => 'category',
'conditions' => '',
'fields' => '',
'order' => ''
),
);
}