static function getMap(): array
{
return [
'ID' => new ORMFieldsIntegerField(
'ID',
[
'primary' => true,
'autocomplete' => true,
'title' => Loc::getMessage('VAT_ENTITY_ID_FIELD'),
]
),
'TIMESTAMP_X' => new ORMFieldsDatetimeField(
'TIMESTAMP_X',
[
'required' => true,
'default_value' => function()
{
return new TypeDateTime();
},
'title' => Loc::getMessage('VAT_ENTITY_TIMESTAMP_X_FIELD'),
]
),
'ACTIVE' => new ORMFieldsBooleanField(
'ACTIVE',
[
'values' => [
'N',
'Y',
],
'default_value' => 'Y',
'title' => Loc::getMessage('VAT_ENTITY_ACTIVE_FIELD'),
]
),
'SORT' => new ORMFieldsIntegerField(
'SORT',
[
'column_name' => 'C_SORT',
'default_value' => 100,
'title' => Loc::getMessage('VAT_ENTITY_SORT_FIELD'),
]
),
'NAME' => new ORMFieldsStringField(
'NAME',
[
'required' => true,
'validation' => function()
{
return [
new ORMFieldsValidatorsLengthValidator(null, 50),
];
},
'title' => Loc::getMessage('VAT_ENTITY_NAME_FIELD'),
]
),
'RATE' => new ORMFieldsFloatField(
'RATE',
[
'nullable' => true,
'title' => Loc::getMessage('VAT_ENTITY_RATE_FIELD'),
]
),
'EXCLUDE_VAT' => new ORMFieldsBooleanField(
'EXCLUDE_VAT',
[
'values' => [
'N',
'Y',
],
'default_value' => 'N',
'title' => Loc::getMessage('VAT_ENTITY_ACTIVE_FIELD'),
]
),
'XML_ID' => new ORMFieldsStringField(
'XML_ID',
[
'required' => false,
'validation' => function()
{
return [
new ORMFieldsValidatorsLengthValidator(null, 255),
];
},
'title' => Loc::getMessage('VAT_ENTITY_XML_ID_FIELD'),
]
),
];
}