1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
vendornotificationsigntable.php
См. документацию.
1<?php
2
4
10
28{
29 public static function getTableName()
30 {
31 return 'b_sec_vendor_notification_sign';
32 }
33
34 public static function getMap()
35 {
36 return [
37 (new IntegerField('ID'))
38 ->configurePrimary()
39 ->configureAutocomplete(),
40 (new IntegerField('USER_ID')),
41 (new StringField('NOTIFICATION_VENDOR_ID')),
42 (new DatetimeField('DATE'))
43 ];
44 }
45
46 public static function signOrIgnore($notificationId, $userId)
47 {
48 $tableName = static::getTableName();
49 $connection = static::getEntity()->getConnection();
50 $sqlHelper = $connection->getSqlHelper();
51
52 [$fields, $values] = $sqlHelper->prepareInsert($tableName, [
53 'USER_ID' => $userId,
54 'NOTIFICATION_VENDOR_ID' => $notificationId,
55 'DATE' => new DateTime
56 ]);
57
58 $query = $sqlHelper->getInsertIgnore($tableName, "($fields)", "VALUES($values)");
59
60 $connection->query($query);
61 }
62}
$connection
Определения actionsdefinitions.php:38
if(!is_object($USER)||! $USER->IsAuthorized()) $userId
Определения check_mail.php:18
$query
Определения get_search.php:11
$fields
Определения yandex_run.php:501