static function getMap()
{
return array(
'ID' => array(
'data_type' => 'integer',
'primary' => true,
'autocomplete' => true,
),
'NAME' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateName'),
'title' => Loc::getMessage('DISK_OBJECT_ENTITY_NAME_FIELD'),
),
'TYPE' => array(
'data_type' => 'enum',
'values' => static::getListOfTypeValues(),
),
'CODE' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateCode'),
),
'XML_ID' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateXmlId'),
),
'STORAGE_ID' => array(
'data_type' => 'integer',
'required' => true,
),
'STORAGE' => array(
'data_type' => 'BitrixDiskInternalsStorageTable',
'reference' => array(
'=this.STORAGE_ID' => 'ref.ID'
),
'join_type' => 'INNER',
),
'REAL_OBJECT_ID' => array(
'data_type' => 'integer',
),
'REAL_OBJECT' => array(
'data_type' => 'BitrixDiskInternalsObjectTable',
'reference' => array(
'=this.REAL_OBJECT_ID' => 'ref.ID'
),
'join_type' => 'INNER',
),
'LOCK' => array(
'data_type' => 'BitrixDiskInternalsObjectLockTable',
'reference' => array(
'=this.REAL_OBJECT_ID' => 'ref.OBJECT_ID'
)
),
'TTL' => array(
'data_type' => 'BitrixDiskInternalsObjectTtlTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
)
),
'PARENT_ID' => array(
'data_type' => 'integer',
),
'CONTENT_PROVIDER' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateContentProvider'),
),
'CREATE_TIME' => array(
'data_type' => 'datetime',
'required' => true,
'default_value' => function() {
return new DateTime();
},
),
'UPDATE_TIME' => array(
'data_type' => 'datetime',
'default_value' => function() {
return new DateTime();
},
),
'SYNC_UPDATE_TIME' => array(
'data_type' => 'datetime',
'default_value' => function() {
return new DateTime();
},
),
'DELETE_TIME' => array(
'data_type' => 'datetime',
),
'CREATED_BY' => array(
'data_type' => 'integer',
),
'CREATE_USER' => array(
'data_type' => 'BitrixMainUserTable',
'reference' => array(
'=this.CREATED_BY' => 'ref.ID'
),
),
'UPDATED_BY' => array(
'data_type' => 'integer',
),
'UPDATE_USER' => array(
'data_type' => 'BitrixMainUserTable',
'reference' => array(
'=this.UPDATED_BY' => 'ref.ID'
),
),
'DELETED_BY' => array(
'data_type' => 'integer',
),
'DELETE_USER' => array(
'data_type' => 'BitrixMainUserTable',
'reference' => array(
'=this.DELETED_BY' => 'ref.ID'
),
),
'GLOBAL_CONTENT_VERSION' => array(
'data_type' => 'integer',
),
'FILE_ID' => array(
'data_type' => 'integer',
),
'FILE_CONTENT' => array(
'data_type' => MainFileTable::class,
'reference' => array(
'=this.FILE_ID' => 'ref.ID'
),
'join_type' => 'LEFT',
),
'SIZE' => array(
'data_type' => 'integer',
),
'EXTERNAL_HASH' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateExternalHash'),
),
'ETAG' => array(
'data_type' => 'string',
'validation' => array(__CLASS__, 'validateEtag'),
),
'DELETED_TYPE' => array(
'data_type' => 'enum',
'values' => static::getListOfDeletedTypes(),
'default_value' => self::DELETED_TYPE_NONE,
),
'TYPE_FILE' => array(
'data_type' => 'enum',
'values' => TypeFile::getListOfValues(),
),
'PATH_PARENT' => array(
'data_type' => 'BitrixDiskInternalsObjectPathTable',
'reference' => array(
'=this.ID' => 'ref.PARENT_ID'
),
'join_type' => 'INNER',
),
'PATH_CHILD' => array(
'data_type' => 'BitrixDiskInternalsObjectPathTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
),
'join_type' => 'INNER',
),
'RECENTLY_USED' => array(
'data_type' => 'BitrixDiskInternalsRecentlyUsedTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
),
'join_type' => 'INNER',
),
'PREVIEW_ID' => array(
'data_type' => 'integer',
),
'VIEW_ID' => array(
'data_type' => 'integer',
),
'SEARCH_INDEX' => array(
'data_type' => 'string',
'expression' => [
'%%TABLE_ALIAS.SEARCH_INDEX'
],
),
'HEAD_INDEX' => array(
'data_type' => 'BitrixDiskInternalsIndexObjectHeadIndexTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
),
'join_type' => 'INNER',
),
'EXTENDED_INDEX' => array(
'data_type' => 'BitrixDiskInternalsIndexObjectExtendedIndexTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
),
'join_type' => 'INNER',
),
'HAS_SEARCH_INDEX' => array(
'data_type' => 'boolean',
'expression' => [
'IF(%%TABLE_ALIAS.SEARCH_INDEX IS NOT NULL, TRUE, FALSE)'
],
),
'TRACKED_OBJECT' => array(
'data_type' => 'BitrixDiskInternalsTrackedObjectTable',
'reference' => array(
'=this.ID' => 'ref.OBJECT_ID'
),
'join_type' => 'INNER',
),
);
}