Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
lastsearch.php
1<?php
2namespace Bitrix\Im\Model;
3
5
32class LastSearchTable extends Main\Entity\DataManager
33{
39 public static function getTableName()
40 {
41 return 'b_im_last_search';
42 }
43
49 public static function getMap()
50 {
51 return array(
52 'ID' => array(
53 'data_type' => 'integer',
54 'primary' => true,
55 'autocomplete' => true,
56 ),
57 'USER_ID' => array(
58 'data_type' => 'integer',
59 'required' => true,
60 ),
61 'DIALOG_ID' => array(
62 'data_type' => 'string',
63 'required' => true,
64 'validation' => array(__CLASS__, 'validateDialogId'),
65 ),
66 'ITEM_RID' => array(
67 'data_type' => 'integer',
68 'required' => true,
69 ),
70 'ITEM_CID' => array(
71 'data_type' => 'integer',
72 'required' => true,
73 ),
74 'RELATION' => array(
75 'data_type' => 'Bitrix\Im\Model\RelationTable',
76 'reference' => array('=this.ITEM_RID' => 'ref.ID'),
77 'join_type' => 'INNER',
78 ),
79 'CHAT' => array(
80 'data_type' => 'Bitrix\Im\Model\ChatTable',
81 'reference' => array('=this.ITEM_CID' => 'ref.ID'),
82 'join_type' => 'INNER',
83 ),
84 );
85 }
91 public static function validateDialogId()
92 {
93 return array(
94 new Main\Entity\Validator\Length(null, 50),
95 );
96 }
97}