Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
ItemToFileTable.php
1<?php
3
11use Bitrix\UI\Avatar;
12
14{
15 public static function getTableName(): string
16 {
17 return 'b_ui_avatar_mask_item_applied_to';
18 }
19
20 public static function getMap(): array
21 {
22 return array(
23 (new IntegerField('ID'))
24 ->configurePrimary()
25 ->configureAutocomplete()
26 ,
27
28 (new IntegerField('ORIGINAL_FILE_ID'))->configureRequired(),
29 (new IntegerField('FILE_ID'))->configureRequired(),
30 (new IntegerField('ITEM_ID'))->configureRequired(),
31
32 (new IntegerField('USER_ID')),
33
34 (new DatetimeField('TIMESTAMP_X'))
35 ->configureRequired()
36 ->configureDefaultValue(function() {
37 return new DateTime();
38 }
39 ),
40
41 (new Reference(
42 'FILE',
43 FileTable::class,
44 Join::on('this.FILE_ID', 'ref.ID')
45 ))->configureJoinType(Join::TYPE_INNER),
46
47 (new Reference(
48 'ITEM',
49 ItemTable::class,
50 Join::on('this.ITEM_ID', 'ref.ID')
51 ))->configureJoinType(Join::TYPE_INNER),
52
53 (new Reference(
54 'USER',
55 Main\UserTable::class,
56 Join::on('this.USER_ID', 'ref.ID')
57 ))->configureJoinType(Join::TYPE_LEFT),
58 );
59 }
60}