Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15194 anikendra 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * Acl Model
5
 *
6
 * @property Group $Group
7
 */
8
class Acl extends AppModel {
9
 
10
/**
11
 * Use table
12
 *
13
 * @var mixed False or table name
14
 */
15
	// public $useTable = 'acl';
16
 
17
/**
18
 * Validation rules
19
 *
20
 * @var array
21
 */
22
	public $validate = array(
23
		'group_id' => array(
24
			'numeric' => array(
25
				'rule' => array('numeric'),
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
			'notEmpty' => array(
33
				'rule' => array('notEmpty'),
34
				//'message' => 'Your custom message here',
35
				//'allowEmpty' => false,
36
				//'required' => false,
37
				//'last' => false, // Stop validation after this rule
38
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
39
			),
40
		),
41
		'action' => array(
42
			'notEmpty' => array(
43
				'rule' => array('notEmpty'),
44
				//'message' => 'Your custom message here',
45
				//'allowEmpty' => false,
46
				//'required' => false,
47
				//'last' => false, // Stop validation after this rule
48
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
49
			),
50
		),
51
		'access' => array(
52
			'boolean' => array(
53
				'rule' => array('boolean'),
54
				//'message' => 'Your custom message here',
55
				//'allowEmpty' => false,
56
				//'required' => false,
57
				//'last' => false, // Stop validation after this rule
58
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
59
			),
60
		),
61
	);
62
 
63
	//The Associations below have been created with all possible keys, those that are not needed can be removed
64
 
65
/**
66
 * belongsTo associations
67
 *
68
 * @var array
69
 */
70
	public $belongsTo = array(
71
		'Group' => array(
72
			'className' => 'Group',
73
			'foreignKey' => 'group_id',
74
			'conditions' => '',
75
			'fields' => '',
76
			'order' => ''
77
		)
78
	);
79
}