Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15085 anikendra 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * UserFilter Model
5
 *
6
 * @property User $User
7
 */
8
class UserFilter extends AppModel {
9
 
10
/**
11
 * Display field
12
 *
13
 * @var string
14
 */
15
	public $displayField = 'filters';
16
 
17
/**
18
 * Validation rules
19
 *
20
 * @var array
21
 */
22
	public $validate = array(
23
		'user_id' => array(
24
			'numeric' => array(
25
				'rule' => array('numeric'),
26
				//'message' => 'Your custom message here',
27
				//'allowEmpty' => false,
28
				//'required' => false,
29
				//'last' => false, // Stop validation after this rule
30
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
31
			),
32
		),
33
		'filters' => array(
34
			'notEmpty' => array(
35
				'rule' => array('notEmpty'),
36
				//'message' => 'Your custom message here',
37
				//'allowEmpty' => false,
38
				//'required' => false,
39
				//'last' => false, // Stop validation after this rule
40
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
41
			),
42
		),
43
	);
44
 
45
	//The Associations below have been created with all possible keys, those that are not needed can be removed
46
 
47
/**
48
 * belongsTo associations
49
 *
50
 * @var array
51
 */
52
	public $belongsTo = array(
53
		'User' => array(
54
			'className' => 'User',
55
			'foreignKey' => 'user_id',
56
			'conditions' => '',
57
			'fields' => '',
58
			'order' => ''
59
		)
60
	);
61
}