Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
20316 aman.kumar 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * Acl Model
5
 *
6
 * @property Group $Group
7
 */
8
class UserAclGroup extends AppModel {
9
 
10
/**
11
 * Use table
12
 *
13
 * @var mixed False or table name
14
 */
15
	// public $useTable = 'useraclgroup';
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
			),
27
			'notEmpty' => array(
28
				'rule' => array('notEmpty'),
29
			),
30
		),
31
		'user_id' => array(
32
			'numeric' => array(
33
				'rule' => array('numeric'),
34
			),
35
			'notEmpty' => array(
36
				'rule' => array('notEmpty'),
37
			),
38
		)
39
 
40
	);
41
 
42
	//The Associations below have been created with all possible keys, those that are not needed can be removed
43
 
44
/**
45
 * belongsTo associations
46
 *
47
 * @var array
48
 */
49
	public $belongsTo = array(
50
		'Group' => array(
51
			'className' => 'Group',
52
			'foreignKey' => 'group_id',
53
			'conditions' => '',
54
			'fields' => '',
55
			'order' => ''
56
		),
57
			'User' => array(
58
					'className' => 'User',
59
					'foreignKey' => 'user_id',
60
					'conditions' => '',
61
					'fields' => '',
62
					'order' => ''
63
			)
64
 
65
	);
66
}