Subversion Repositories SmartDukaan

Rev

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

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