opensupports/server/models/CustomFieldValue.php

31 lines
808 B
PHP
Raw Normal View History

2019-02-03 20:47:29 +01:00
<?php
/**
* @api {OBJECT} Customfieldvalue Customfieldvalue
2019-10-08 01:21:43 +02:00
* @apiVersion 4.5.0
2019-02-03 20:47:29 +01:00
* @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,
];
}
}