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