public static function getMap()
{
return array(
'ID' => array(
'data_type' => 'integer',
'primary' => true,
'autocomplete' => true,
'title' => Loc::getMessage('SCHEMES_ENTITY_ID_FIELD'),
),
'NAME' => array(
'data_type' => 'string',
'required' => true,
'validation' => array(__CLASS__, 'validateName'),
'title' => Loc::getMessage('SCHEMES_ENTITY_NAME_FIELD'),
),
'DATE_CREATE' => array(
'data_type' => 'datetime',
'title' => Loc::getMessage('SCHEMES_ENTITY_DATE_CREATE_FIELD'),
),
'CREATED_BY' => array(
'data_type' => 'integer',
'required' => true,
'title' => Loc::getMessage('SCHEMES_ENTITY_CREATED_BY_FIELD'),
),
'ACTIVE_FROM' => array(
'data_type' => 'datetime',
'title' => Loc::getMessage('SCHEMES_ENTITY_ACTIVE_FROM_FIELD'),
),
'ACTIVE_TO' => array(
'data_type' => 'datetime',
'title' => Loc::getMessage('SCHEMES_ENTITY_ACTIVE_TO_FIELD'),
),
'VALUE' => array(
'data_type' => 'text',
'required' => true,
'title' => Loc::getMessage('SCHEMES_ENTITY_VALUE_FIELD'),
'serialized' => true
),
);
}
CREATE TABLE IF NOT EXISTS `test_module_schemes` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`NAME` varchar(255) NOT NULL,
`DATE_CREATE` datetime NULL,
`CREATED_BY` int(18) NOT NULL,
`ACTIVE_FROM` datetime NULL,
`ACTIVE_TO` datetime NULL,
`VALUE` longtext NOT NULL,
PRIMARY KEY (`ID`)
);