-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathLogs.php
86 lines (75 loc) · 1.51 KB
/
Logs.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?php
class Logs extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
*/
public $id;
/**
*
* @var string
*/
public $username;
/**
*
* @var string
*/
public $route;
/**
*
* @var string
*/
public $date;
/**
* Initialize method for model.
*/
public function initialize()
{
$this->setConnectionService('db_log'); // Connection service for log database
}
/**
* Returns table name mapped in the model.
*
* @return string
*/
public function getSource()
{
return 'logs';
}
/**
* Allows to query a set of records that match the specified conditions
*
* @param mixed $parameters
* @return Logs[]
*/
public static function find($parameters = null)
{
return parent::find($parameters);
}
/**
* Allows to query the first record that match the specified conditions
*
* @param mixed $parameters
* @return Logs
*/
public static function findFirst($parameters = null)
{
return parent::findFirst($parameters);
}
/**
* Independent Column Mapping.
* Keys are the real names in the table and the values their names in the application
*
* @return array
*/
public function columnMap()
{
return array(
'id' => 'id',
'username' => 'username',
'route' => 'route',
'date' => 'date',
);
}
}