Subversion Repositories SmartDukaan

Rev

Rev 14776 | Go to most recent revision | 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(
14776 anikendra 54
			'isUrl' => array(
55
				'rule' => array('url'),
56
				//'message' => 'Your custom message here',
57
				'allowEmpty' => true,
58
				'required' => false,
59
				//'last' => false, // Stop validation after this rule
60
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
61
			),
14782 anikendra 62
		),*/
14776 anikendra 63
	);
64
 
65
	//The Associations below have been created with all possible keys, those that are not needed can be removed
66
 
67
/**
68
 * hasMany associations
69
 *
70
 * @var array
71
 */
72
	public $hasMany = array(
73
		'Pushnotification' => array(
74
			'className' => 'Pushnotification',
75
			'foreignKey' => 'notification_campaign_id',
76
			'dependent' => false,
77
			'conditions' => '',
78
			'fields' => '',
79
			'order' => '',
80
			'limit' => '',
81
			'offset' => '',
82
			'exclusive' => '',
83
			'finderQuery' => '',
84
			'counterQuery' => ''
85
		)
86
	);
87
 
88
}