Guillermo Giuliana 6a34c24d7d
update script and change 4.6 to 4.7 (#809)
* update script and change 4.6 to 4.7

* fix 4.7.0 script
2020-06-16 21:26:04 -03:00

37 lines
830 B
PHP
Executable File

<?php
/**
* @api {OBJECT} APIKey APIKey
* @apiVersion 4.7.0
* @apiGroup Data Structures
* @apiParam {String} name Name of the APIKey.
* @apiParam {String} token Token of the APIKey.
*/
class APIKey extends DataStore {
const TABLE = 'apikey';
const REGISTRATION = 'REGISTRATION';
const TICKET_CREATE = 'TICKET_CREATE';
const TYPES = [APIKey::REGISTRATION, APIKey::TICKET_CREATE];
public static function getProps() {
return [
'name',
'token',
'type'
];
}
public function getDefaultProps() {
return [
'type' => APIKey::REGISTRATION
];
}
public function toArray() {
return [
'name' => $this->name,
'token' => $this->token,
'type' => $this->type
];
}
}