opensupports/server/models/CustomFieldValue.php
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

31 lines
808 B
PHP

<?php
/**
* @api {OBJECT} Customfieldvalue Customfieldvalue
* @apiVersion 4.7.0
* @apiGroup Data Structures
* @apiParam {Number} id Id of the value.
* @apiParam {Customfield} customfield Customfield of the value.
* @apiParam {String} value Content of the value..
*/
class Customfieldvalue extends DataStore {
const TABLE = 'customfieldvalue';
public static function getProps() {
return [
'customfield',
'value',
'customfieldoption'
];
}
public function toArray() {
return [
'id' => $this->id,
'customfield' => $this->customfield->name,
'value' => $this->value,
'customfieldoption' => $this->customfieldoption ? $this->customfieldoption->toArray() : null,
];
}
}