1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
spaceuserrecentactivitytable.php
См. документацию.
1<?php
2namespace Bitrix\Socialnetwork\Internals\Space\RecentActivity;
3
4use Bitrix\Main\ORM\Data\DataManager;
5use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
6use Bitrix\Main\ORM\Data\Internal\MergeTrait;
7use Bitrix\Main\ORM\Fields\DatetimeField;
8use Bitrix\Main\ORM\Fields\IntegerField;
9use Bitrix\Main\ORM\Fields\StringField;
10use Bitrix\Main\ORM\Fields\Validators\LengthValidator;
11
40
42{
43 use MergeTrait;
44 use DeleteByFilterTrait;
50 public static function getTableName(): string
51 {
52 return 'b_sonet_space_user_recent_activity';
53 }
54
60 public static function getMap(): array
61 {
62 return [
63 (new IntegerField('ID'))
64 ->configurePrimary()
65 ->configureAutocomplete()
66 ,
67 (new IntegerField('USER_ID'))
68 ->configureRequired()
69 ,
70 (new IntegerField('SPACE_ID'))
71 ->configureRequired()
72 ,
73 (new StringField('TYPE_ID', ['validation' => [__CLASS__, 'validateTypeId']]))
74 ->configureRequired()
75 ,
76 (new IntegerField('ENTITY_ID')),
77 (new DatetimeField('DATETIME'))
78 ->configureRequired()
79 ,
80 (new IntegerField('SECONDARY_ENTITY_ID')),
81 ];
82 }
83
89 public static function validateTypeId(): array
90 {
91 return [
92 new LengthValidator(null, 32),
93 ];
94 }
95
96 public static function getUniqueFields(): array
97 {
98 return ['USER_ID', 'SPACE_ID', 'TYPE_ID', 'ENTITY_ID'];
99 }
100}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804