Subversion Repositories SmartDukaan

Rev

Rev 13558 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13532 anikendra 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * Store Model
5
 *
6
 * @property Order $Order
7
 * @property StoreProduct $StoreProduct
8
 */
9
class Store extends AppModel {
10
 
11
/**
12
 * Display field
13
 *
14
 * @var string
15
 */
16
	public $displayField = 'name';
17
 
18
/**
19
 * Validation rules
20
 *
21
 * @var array
22
 */
23
	public $validate = array(
24
		'name' => array(
25
			'notEmpty' => array(
26
				'rule' => array('notEmpty'),
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
		'affiliate_id' => array(
35
			'notEmpty' => array(
36
				'rule' => array('notEmpty'),
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
 * hasMany associations
50
 *
51
 * @var array
52
 */
53
	public $hasMany = array(
54
		'Order' => array(
55
			'className' => 'Order',
56
			'foreignKey' => 'store_id',
57
			'dependent' => false,
58
			'conditions' => '',
59
			'fields' => '',
60
			'order' => '',
61
			'limit' => '',
62
			'offset' => '',
63
			'exclusive' => '',
64
			'finderQuery' => '',
65
			'counterQuery' => ''
66
		),
67
		'StoreProduct' => array(
68
			'className' => 'StoreProduct',
69
			'foreignKey' => 'store_id',
70
			'dependent' => false,
71
			'conditions' => '',
72
			'fields' => '',
73
			'order' => '',
74
			'limit' => '',
75
			'offset' => '',
76
			'exclusive' => '',
77
			'finderQuery' => '',
78
			'counterQuery' => ''
79
		)
80
	);
81
 
82
}