1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
recent.php
См. документацию.
1<?php
2namespace Bitrix\Im\Model;
3
4use Bitrix\Im\V2\Common\MultiplyInsertTrait;
5use Bitrix\Im\V2\Common\UpdateByFilterTrait;
6use Bitrix\Main;
7
34
35class RecentTable extends Main\Entity\DataManager
36{
37 use \Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
38 use UpdateByFilterTrait;
39 use MultiplyInsertTrait;
40 use Main\ORM\Data\Internal\MergeTrait;
46 public static function getTableName()
47 {
48 return 'b_im_recent';
49 }
50
56 public static function getMap()
57 {
58 return array(
59 'USER_ID' => array(
60 'data_type' => 'integer',
61 'primary' => true,
62 //'title' => Loc::getMessage('RECENT_ENTITY_USER_ID_FIELD'),
63 ),
64 'ITEM_TYPE' => array(
65 'data_type' => 'string',
66 'primary' => true,
67 'validation' => array(__CLASS__, 'validateItemType'),
68 //'title' => Loc::getMessage('RECENT_ENTITY_ITEM_TYPE_FIELD'),
69 ),
70 'ITEM_ID' => array(
71 'data_type' => 'integer',
72 'primary' => true,
73 //'title' => Loc::getMessage('RECENT_ENTITY_ITEM_ID_FIELD'),
74 ),
75 'ITEM_MID' => array(
76 'data_type' => 'integer',
77 'default_value' => 0,
78 //'title' => Loc::getMessage('RECENT_ENTITY_ITEM_MID_FIELD'),
79 ),
80 'ITEM_CID' => array(
81 'data_type' => 'integer',
82 'default_value' => 0,
83 ),
84 'ITEM_RID' => array(
85 'data_type' => 'integer',
86 'default_value' => 0,
87 ),
88 'ITEM_OLID' => array(
89 'data_type' => 'integer',
90 'default_value' => 0,
91 ),
92 'PINNED' => array(
93 'data_type' => 'boolean',
94 'values' => array('N', 'Y'),
95 'default_value' => 'N',
96 ),
97 'UNREAD' => array(
98 'data_type' => 'boolean',
99 'values' => array('N', 'Y'),
100 'default_value' => 'N',
101 ),
102 'DATE_MESSAGE' => array(
103 'data_type' => 'datetime',
104 'required' => true,
105 'default_value' => array(__CLASS__, 'getCurrentDate'),
106 ),
107 'DATE_UPDATE' => array(
108 'data_type' => 'datetime',
109 'required' => true,
110 'default_value' => array(__CLASS__, 'getCurrentDate'),
111 ),
112 'DATE_LAST_ACTIVITY' => array(
113 'data_type' => 'datetime',
114 'required' => true,
115 'default_value' => array(__CLASS__, 'getCurrentDate'),
116 ),
117 'RELATION' => array(
118 'data_type' => 'Bitrix\Im\Model\RelationTable',
119 'reference' => array('=this.ITEM_RID' => 'ref.ID'),
120 'join_type' => 'LEFT',
121 ),
122 'CHAT' => array(
123 'data_type' => 'Bitrix\Im\Model\ChatTable',
124 'reference' => array('=this.ITEM_CID' => 'ref.ID'),
125 'join_type' => 'LEFT',
126 ),
127 'MESSAGE' => array(
128 'data_type' => 'Bitrix\Im\Model\MessageTable',
129 'reference' => array('=this.ITEM_MID' => 'ref.ID'),
130 'join_type' => 'LEFT',
131 ),
132 'MESSAGE_UUID' => array(
133 'data_type' => 'Bitrix\Im\Model\MessageUuidTable',
134 'reference' => array('=this.ITEM_MID' => 'ref.MESSAGE_ID'),
135 'join_type' => 'LEFT',
136 ),
137 'MARKED_ID' => array(
138 'data_type' => 'integer',
139 'default_value' => 0,
140 ),
141 'PIN_SORT' => array(
142 'data_type' => 'integer',
143 ),
144 );
145 }
146
152 public static function validateItemType()
153 {
154 return array(
155 new Main\Entity\Validator\Length(null, 1),
156 );
157 }
158
164 public static function getCurrentDate()
165 {
166 return new \Bitrix\Main\Type\DateTime();
167 }
168}
static getCurrentDate()
Определения recent.php:164
static getMap()
Определения recent.php:56
static validateItemType()
Определения recent.php:152
static getTableName()
Определения recent.php:46
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения ufield.php:9