Subversion Repositories SmartDukaan

Rev

Rev 15051 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
15051 manas 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * Agent Model
5
 *
6
 * @property Call $Call
7
 * @property PlayStoreLink $PlayStoreLink
8
 */
9
class Agent 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
		'email' => array(
35
			'email' => array(
36
				'rule' => array('email'),
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
		'password' => array(
45
			'notEmpty' => array(
46
				'rule' => array('notEmpty'),
47
				//'message' => 'Your custom message here',
48
				//'allowEmpty' => false,
49
				//'required' => false,
50
				//'last' => false, // Stop validation after this rule
51
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
52
			),
53
		),
54
	);
55
 
56
	//The Associations below have been created with all possible keys, those that are not needed can be removed
57
 
58
/**
59
 * hasMany associations
60
 *
61
 * @var array
62
 */
63
	public $hasMany = array(
64
		'Call' => array(
65
			'className' => 'Call',
66
			'foreignKey' => 'agent_id',
67
			'dependent' => false,
68
			'conditions' => '',
69
			'fields' => '',
70
			'order' => '',
71
			'limit' => '',
72
			'offset' => '',
73
			'exclusive' => '',
74
			'finderQuery' => '',
75
			'counterQuery' => ''
76
		),
15073 manas 77
		'AgentRole' => array(
78
			'className' => 'AgentRole',
79
			'foreignKey' => 'agent_id',
80
			'dependent' => false,
81
			'conditions' => '',
82
			'fields' => '',
83
			'order' => '',
84
			'limit' => '',
85
			'offset' => '',
86
			'exclusive' => '',
87
			'finderQuery' => '',
88
			'counterQuery' => ''
89
		),
15051 manas 90
		'PlayStoreLink' => array(
91
			'className' => 'PlayStoreLink',
92
			'foreignKey' => 'agent_id',
93
			'dependent' => false,
94
			'conditions' => '',
95
			'fields' => '',
96
			'order' => '',
97
			'limit' => '',
98
			'offset' => '',
99
			'exclusive' => '',
100
			'finderQuery' => '',
101
			'counterQuery' => ''
102
		)
103
	);
104
 
105
}