Subversion Repositories SmartDukaan

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
15751 manas 1
<?php
2
App::uses('AppModel', 'Model');
3
/**
4
 * UserActivityStatus Model
5
 *
6
 * @property User $User
7
 */
8
class UserActivityStatus extends AppModel {
9
 
10
/**
11
 * Use table
12
 *
13
 * @var mixed False or table name
14
 */
15
	public $useTable = 'user_activity_status';
16
 
17
/**
18
 * Primary key field
19
 *
20
 * @var string
21
 */
22
	public $primaryKey = 'created';
23
 
24
/**
25
 * Validation rules
26
 *
27
 * @var array
28
 */
29
	public $validate = array(
30
		'user_id' => array(
31
			'numeric' => array(
32
				'rule' => array('numeric'),
33
				//'message' => 'Your custom message here',
34
				//'allowEmpty' => false,
35
				//'required' => false,
36
				//'last' => false, // Stop validation after this rule
37
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
38
			),
39
		),
40
		'comment' => array(
41
			'notEmpty' => array(
42
				'rule' => array('notEmpty'),
43
				//'message' => 'Your custom message here',
44
				//'allowEmpty' => false,
45
				//'required' => false,
46
				//'last' => false, // Stop validation after this rule
47
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
48
			),
49
		),
50
		'last_active' => array(
51
			'datetime' => array(
52
				'rule' => array('datetime'),
53
				//'message' => 'Your custom message here',
54
				//'allowEmpty' => false,
55
				//'required' => false,
56
				//'last' => false, // Stop validation after this rule
57
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
58
			),
59
		),
60
		'last_active_diff' => array(
61
			'numeric' => array(
62
				'rule' => array('numeric'),
63
				//'message' => 'Your custom message here',
64
				//'allowEmpty' => false,
65
				//'required' => false,
66
				//'last' => false, // Stop validation after this rule
67
				//'on' => 'create', // Limit validation to 'create' or 'update' operations
68
			),
69
		),
70
	);
71
 
72
	//The Associations below have been created with all possible keys, those that are not needed can be removed
73
 
74
/**
75
 * belongsTo associations
76
 *
77
 * @var array
78
 */
79
	public $belongsTo = array(
80
		'User' => array(
81
			'className' => 'User',
82
			'foreignKey' => 'user_id',
83
			'conditions' => '',
84
			'fields' => '',
85
			'order' => ''
86
		)
87
	);
88
}