1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
consent.php
См. документацию.
1<?php
8namespace Bitrix\Main\UserConsent\Internals;
9
10use Bitrix\Main\ORM\Fields\Relations\OneToMany;
11use Bitrix\Main\Type\DateTime;
12use Bitrix\Main\Localization\Loc;
13use Bitrix\Main\ORM\Data\DataManager;
14
15Loc::loadMessages(__FILE__);
16
34{
40 public static function getTableName()
41 {
42 return 'b_consent_user_consent';
43 }
44
51 public static function getMap()
52 {
53 return array(
54 'ID' => array(
55 'data_type' => 'integer',
56 'primary' => true,
57 'autocomplete' => true,
58 ),
59 'DATE_INSERT' => array(
60 'data_type' => 'datetime',
61 'required' => true,
62 'default_value' => new DateTime(),
63 ),
64 'AGREEMENT_ID' => array(
65 'data_type' => 'integer',
66 'required' => true,
67 ),
68 'USER_ID' => array(
69 'data_type' => 'integer',
70 ),
71 'IP' => array(
72 'data_type' => 'string',
73 'required' => true,
74 'validation' => function()
75 {
76 return [
77 function ($value)
78 {
79 return filter_var($value, FILTER_VALIDATE_IP) !== false;
80 }
81 ];
82 }
83 ),
84 'URL' => array(
85 'data_type' => 'string',
86 'required' => false,
87 ),
88 'ORIGIN_ID' => array(
89 'data_type' => 'string',
90 'required' => false,
91 ),
92 'ORIGINATOR_ID' => array(
93 'data_type' => 'string',
94 'required' => false,
95 ),
96 'USER' => array(
97 'data_type' => 'Bitrix\Main\UserTable',
98 'reference' => array('=this.USER_ID' => 'ref.ID'),
99 ),
100 (new OneToMany('ITEMS', UserConsentItemTable::class, 'USER_CONSENT'))
101 );
102 }
103}
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804