Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

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