Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
13532 anikendra 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * UserAccount Model
5
 *
6
 * @property User $User
7
 */
8
class UserAccount extends AppModel {
9
 
10
/**
11
 * Validation rules
12
 *
13
 * @var array
14
 */
15
	public $validate = array(
16
		'user_id' => array(
17
			'numeric' => array(
18
				'rule' => array('numeric'),
19
				//'message' => 'Your custom message here',
20
				//'allowEmpty' => false,
21
				//'required' => false,
22
				//'last' => false, // Stop validation after this rule
23
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
24
			),
25
		),
26
		'account_key' => array(
27
			'notEmpty' => array(
28
				'rule' => array('notEmpty'),
29
				//'message' => 'Your custom message here',
30
				//'allowEmpty' => false,
31
				//'required' => false,
32
				//'last' => false, // Stop validation after this rule
33
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
34
			),
35
		),
36
	);
37
 
38
	//The Associations below have been created with all possible keys, those that are not needed can be removed
39
 
40
/**
41
 * belongsTo associations
42
 *
43
 * @var array
44
 */
45
	public $belongsTo = array(
46
		'User' => array(
47
			'className' => 'User',
48
			'foreignKey' => 'user_id',
49
			'conditions' => '',
50
			'fields' => '',
51
			'order' => ''
52
		)
53
	);
54
}