| Current Path : /var/www/homesaver/www/bitrix/modules/ram.calc/lib/ |
| Current File : /var/www/homesaver/www/bitrix/modules/ram.calc/lib/property.php |
<?php
namespace Ram\Calc;
use Bitrix\Main,
Bitrix\Main\Localization\Loc;
Loc::loadMessages(__FILE__);
/**
* Class PropertyTable
*
* Fields:
* <ul>
* <li> ID int mandatory
* <li> SERVICE_ID int mandatory
* <li> PROPERTIES string optional
* <li> DATA string optional
* </ul>
*
* @package Ram\Calc
**/
class PropertyTable extends Main\Entity\DataManager
{
/**
* Returns DB table name for entity.
*
* @return string
*/
public static function getTableName()
{
return 'ram_calc_property';
}
/**
* Returns entity map definition.
*
* @return array
*/
public static function getMap()
{
return array(
'ID' => array(
'data_type' => 'integer',
'primary' => true,
'autocomplete' => true,
'title' => Loc::getMessage('PROPERTY_ENTITY_ID_FIELD'),
),
'SERVICE_ID' => array(
'data_type' => 'integer',
'required' => true,
'title' => Loc::getMessage('PROPERTY_ENTITY_SERVICE_ID_FIELD'),
),
'PROPERTIES' => array(
'data_type' => 'text',
'title' => Loc::getMessage('PROPERTY_ENTITY_PROPERTIES_FIELD'),
'serialized' => true,
),
'DATA' => array(
'data_type' => 'text',
'title' => Loc::getMessage('PROPERTY_ENTITY_DATA_FIELD'),
'serialized' => true,
),
);
}
}
?>