2017-01-11 08:25:26 +01:00
|
|
|
<?php
|
2017-04-21 05:34:20 +02:00
|
|
|
/**
|
|
|
|
* @api {OBJECT} Stat Stat
|
2022-01-04 17:24:06 +01:00
|
|
|
* @apiVersion 4.11.0
|
2017-04-21 05:34:20 +02:00
|
|
|
* @apiGroup Data Structures
|
2017-05-11 21:37:03 +02:00
|
|
|
* @apiParam {Number} date The date of the stat as a number in format YYYYMMDD.
|
|
|
|
* @apiParam {String} type The type of the stat. It can be CREATE_TICKET, CLOSE, SIGNUP, COMMENT, ASSIGN or UNASSIGN
|
|
|
|
* @apiParam {Boolean} general Indicates if the stat is from the general system or from a particular ticket.
|
2017-04-21 05:34:20 +02:00
|
|
|
* @apiParam {String} value The value of the stat.
|
|
|
|
*/
|
|
|
|
|
2017-01-11 08:25:26 +01:00
|
|
|
class Stat extends DataStore {
|
|
|
|
const TABLE = 'stat';
|
|
|
|
|
|
|
|
public static function getProps() {
|
|
|
|
return array (
|
|
|
|
'date',
|
|
|
|
'type',
|
|
|
|
'general',
|
|
|
|
'value'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDefaultProps() {
|
|
|
|
return array();
|
|
|
|
}
|
2017-01-12 06:50:45 +01:00
|
|
|
public function toArray() {
|
|
|
|
return [
|
|
|
|
'date' => $this->date,
|
|
|
|
'type' => $this->type,
|
|
|
|
'general' => $this->general,
|
|
|
|
'value' => $this->value
|
|
|
|
];
|
|
|
|
}
|
2017-01-11 08:25:26 +01:00
|
|
|
}
|