opensupports/server/models/CustomFieldValue.php
Guillermo Giuliana e15bd15f07
Updates to 4.10.0 (#1061)
* change 4.9 to 4.10

* new translations
2021-10-18 22:06:20 -03:00

31 lines
809 B
PHP

<?php
/**
* @api {OBJECT} Customfieldvalue Customfieldvalue
* @apiVersion 4.10.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,
];
}
}