Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
groupthread.php
1<?php
9
13
14Loc::loadMessages(__FILE__);
15
32class GroupThreadTable extends Entity\DataManager
33{
34 const STATUS_NEW = 'N';
35 const STATUS_IN_PROGRESS = 'P';
36 const STATUS_DONE = 'D';
37
43 public static function getTableName()
44 {
45 return 'b_sender_group_thread';
46 }
47
53 public static function getMap()
54 {
55 return [
56 'THREAD_ID' => [
57 'data_type' => 'integer',
58 'primary' => true,
59 'autocomplete' => true,
60 ],
61 'GROUP_STATE_ID' => [
62 'data_type' => 'integer',
63 'primary' => true,
64 'required' => true,
65 ],
66 'STEP' => [
67 'data_type' => 'integer',
68 'required' => true,
69 ],
70 'STATUS' => [
71 'data_type' => 'string',
72 'required' => true,
73 ],
74 'THREAD_TYPE' => [
75 'data_type' => 'string',
76 'required' => true,
77 ],
78 'EXPIRE_AT' => [
79 'data_type' => 'datetime',
80 'required' => true,
81 ],
82 ];
83 }
84
92 public static function deleteList(array $filter)
93 {
94 $entity = static::getEntity();
95 $connection = $entity->getConnection();
96
97 \CTimeZone::disable();
98 $sql = sprintf(
99 'DELETE FROM %s WHERE %s',
100 $connection->getSqlHelper()->quote($entity->getDbTableName()),
101 Query::buildFilterSql($entity, $filter)
102 );
103 $res = $connection->query($sql);
104 \CTimeZone::enable();
105
106 return $res;
107 }
108}
static loadMessages($file)
Definition loc.php:64