1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
eventconnectiontable.php
См. документацию.
1<?php
2namespace Bitrix\Calendar\Internals;
3
4use Bitrix\Dav\Internals\DavConnectionTable;
5use Bitrix\Main\ArgumentException;
6use Bitrix\Main\Entity\IntegerField;
7use Bitrix\Main\Entity\ReferenceField;
8use Bitrix\Main\ORM\Data\DataManager;
9use Bitrix\Main\ORM\Fields\ArrayField;
10use Bitrix\Main\ORM\Fields\StringField;
11use Bitrix\Main\ORM\Query\Join;
12use Bitrix\Main\SystemException;
13
14// TODO: localization
15// TODO: add class description
16
34{
35 // without data field
36 public const defaultSelect = [
37 'ID',
38 'EVENT_ID',
39 'CONNECTION_ID',
40 'VENDOR_EVENT_ID',
41 'SYNC_STATUS',
42 'RETRY_COUNT',
43 'ENTITY_TAG',
44 'VERSION',
45 'VENDOR_VERSION_ID',
46 'RECURRENCE_ID',
47 ];
48 public static function getTableName()
49 {
50 return 'b_calendar_event_connection';
51 }
52
59 public static function getMap()
60 {
61 return [
62 (new IntegerField('ID'))
63 ->configurePrimary()
64 ->configureAutocomplete()
65 ,
66 (new IntegerField('EVENT_ID'))
67 ->configureRequired()
68 ,
69 (new IntegerField('CONNECTION_ID'))
70 ->configureRequired()
71 ,
72 (new StringField('VENDOR_EVENT_ID'))
73 ->configureSize(255)
74 ,
75 (new StringField('SYNC_STATUS'))
76 ->configureNullable()
77 ->configureSize(20)
78 ,
79 (new IntegerField('RETRY_COUNT'))
80 ->configureDefaultValue(0)
81 ,
82 (new StringField('ENTITY_TAG'))
83 ->configureNullable()
84 ->configureSize(255)
85 ,
86 (new StringField('VENDOR_VERSION_ID'))
87 ->configureNullable()
88 ->configureSize(255)
89 ,
90 (new StringField('VERSION'))
91 ->configureNullable()
92 ->configureSize(255)
93 ,
94 (new ArrayField('DATA'))
95 ->configureNullable()
96 ,
97 (new StringField('RECURRENCE_ID'))
98 ->configureNullable()
99 ->configureSize(255)
100 ,
101 (new ReferenceField(
102 'EVENT',
103 EventTable::class,
104 Join::on('this.EVENT_ID', 'ref.ID'),
105 )),
106 (new ReferenceField(
107 'CONNECTION',
108 DavConnectionTable::class,
109 Join::on('this.CONNECTION_ID', 'ref.ID'),
110 )),
111 ];
112 }
113}