Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15051 manas 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * Call Model
5
 *
6
 * @property Retailer $Retailer
7
 * @property Agent $Agent
8
 * @property PlayStoreLink $PlayStoreLink
9
 */
10
class Call extends AppModel {
11
 
12
/**
13
 * Display field
14
 *
15
 * @var string
16
 */
17
	public $displayField = 'id';
18
 
19
/**
20
 * Validation rules
21
 *
22
 * @var array
23
 */
24
	public $validate = array(
25
		'retailer_id' => array(
26
			'numeric' => array(
27
				'rule' => array('numeric'),
28
				//'message' => 'Your custom message here',
29
				//'allowEmpty' => false,
30
				//'required' => false,
31
				//'last' => false, // Stop validation after this rule
32
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
33
			),
34
		),
35
		'agent_id' => array(
36
			'numeric' => array(
37
				'rule' => array('numeric'),
38
				//'message' => 'Your custom message here',
39
				//'allowEmpty' => false,
40
				//'required' => false,
41
				//'last' => false, // Stop validation after this rule
42
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
43
			),
44
		),
45
	);
46
 
47
	//The Associations below have been created with all possible keys, those that are not needed can be removed
48
 
49
/**
50
 * belongsTo associations
51
 *
52
 * @var array
53
 */
54
	public $belongsTo = array(
55
		'Retailer' => array(
56
			'className' => 'Retailer',
57
			'foreignKey' => 'retailer_id',
58
			'conditions' => '',
59
			'fields' => '',
60
			'order' => ''
61
		),
62
		'Agent' => array(
63
			'className' => 'Agent',
64
			'foreignKey' => 'agent_id',
65
			'conditions' => '',
66
			'fields' => '',
67
			'order' => ''
68
		)
69
	);
70
 
71
/**
72
 * hasMany associations
73
 *
74
 * @var array
75
 */
76
	public $hasMany = array(
77
		'PlayStoreLink' => array(
78
			'className' => 'PlayStoreLink',
79
			'foreignKey' => 'call_id',
80
			'dependent' => false,
81
			'conditions' => '',
82
			'fields' => '',
83
			'order' => '',
84
			'limit' => '',
85
			'offset' => '',
86
			'exclusive' => '',
87
			'finderQuery' => '',
88
			'counterQuery' => ''
89
		)
90
	);
91
 
92
}