Subversion Repositories SmartDukaan

Rev

Rev 14934 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14934 Rev 15034
Line 1... Line 1...
1
<?php
1
<?php
2
App::uses('AppModel', 'Model');
2
App::uses('AppModel', 'Model');
3
/**
3
/**
4
 * SaholicLog Model
4
 * SaholicLog Model
5
 *
5
 *
-
 
6
 * @property User $User
6
 */
7
 */
7
class SaholicLog extends AppModel {
8
class SaholicLog extends AppModel {
8
 
9
 
-
 
10
/**
-
 
11
 * Display field
-
 
12
 *
-
 
13
 * @var string
-
 
14
 */
-
 
15
	public $displayField = 'id';
-
 
16
 
-
 
17
/**
-
 
18
 * Validation rules
-
 
19
 *
-
 
20
 * @var array
-
 
21
 */
-
 
22
	public $validate = array(
-
 
23
		'user_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
		),
-
 
33
		'url' => 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
		'httpstatus' => 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
		),
-
 
53
		'html' => array(
-
 
54
			'notEmpty' => array(
-
 
55
				'rule' => array('notEmpty'),
-
 
56
				//'message' => 'Your custom message here',
-
 
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
	);
-
 
64
 
-
 
65
	//The Associations below have been created with all possible keys, those that are not needed can be removed
-
 
66
 
-
 
67
/**
-
 
68
 * belongsTo associations
-
 
69
 *
-
 
70
 * @var array
-
 
71
 */
-
 
72
	public $belongsTo = array(
-
 
73
		'User' => array(
-
 
74
			'className' => 'User',
-
 
75
			'foreignKey' => 'user_id',
-
 
76
			'conditions' => '',
-
 
77
			'fields' => '',
-
 
78
			'order' => ''
-
 
79
		)
-
 
80
	);
9
}
81
}