Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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