- Модуль: documentgenerator
- Путь к файлу: ~/bitrix/modules/documentgenerator/lib/model/document.php
- Класс: BitrixDocumentGeneratorModelDocumentTable
- Вызов: DocumentTable::getMap
static function getMap()
{
return [
new MainEntityIntegerField('ID', [
'primary' => true,
'autocomplete' => true,
]),
new MainEntityStringField('TITLE', [
'required' => true,
]),
new MainEntityStringField('NUMBER', [
'required' => true,
]),
new MainEntityIntegerField('TEMPLATE_ID', [
'required' => true,
]),
new MainEntityStringField('PROVIDER', [
'validation' => function()
{
return [
function($value)
{
if(DataProviderManager::checkProviderName($value) || empty($value))
{
return true;
}
else
{
return Loc::getMessage('DOCUMENTGENERATOR_MODEL_TEMPLATE_CLASS_VALIDATION', ['#CLASSNAME#' => $value, '#PARENT#' => DataProvider::class]);
}
},
];
},
]),
new MainEntityStringField('VALUE', [
'required' => true,
]),
new MainEntityIntegerField('FILE_ID', [
'required' => true,
]),
new MainEntityIntegerField('IMAGE_ID'),
new MainEntityIntegerField('PDF_ID'),
new MainEntityDatetimeField('CREATE_TIME', [
'required' => true,
'default_value' => function(){return new MainTypeDateTime();},
]),
new MainEntityDatetimeField('UPDATE_TIME', [
'required' => true,
'default_value' => function(){return new MainTypeDateTime();},
]),
new MainEntityTextField('VALUES', [
'serialized' => true
]),
new MainEntityIntegerField('CREATED_BY'),
new MainEntityIntegerField('UPDATED_BY'),
new MainEntityReferenceField(
'TEMPLATE',
'BitrixDocumentGeneratorModelTemplate',
['=this.TEMPLATE_ID' => 'ref.ID']
),
];
}