Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
linkfavorite.php
1<?php
2namespace Bitrix\Im\Model;
3
5use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
12
43{
44 use DeleteByFilterTrait;
45
51 public static function getTableName()
52 {
53 return 'b_im_link_favorite';
54 }
55
61 public static function getMap()
62 {
63 return [
64 'ID' => new IntegerField(
65 'ID',
66 [
67 'primary' => true,
68 'autocomplete' => true,
69 ]
70 ),
71 'MESSAGE_ID' => new IntegerField(
72 'MESSAGE_ID',
73 [
74 'required' => true,
75 ]
76 ),
77 'CHAT_ID' => new IntegerField(
78 'CHAT_ID',
79 [
80 ]
81 ),
82 'AUTHOR_ID' => new IntegerField(
83 'AUTHOR_ID',
84 [
85 ]
86 ),
87 'DATE_CREATE' => new DatetimeField(
88 'DATE_CREATE',
89 [
90 'required' => true,
91 'default_value' => static function() {
92 return new DateTime();
93 }
94 ]
95 ),
96 'MESSAGE' => (new Reference(
97 'MESSAGE',
98 MessageTable::class,
99 Join::on('this.MESSAGE_ID', 'ref.ID')
100 ))->configureJoinType(Join::TYPE_INNER),
101 'CHAT' => (new Reference(
102 'CHAT',
103 ChatTable::class,
104 Join::on('this.CHAT_ID', 'ref.ID')
105 ))->configureJoinType(Join::TYPE_INNER),
106 'AUTHOR' => (new Reference(
107 'AUTHOR',
108 UserTable::class,
109 Join::on('this.AUTHOR_ID', 'ref.ID')
110 ))->configureJoinType(Join::TYPE_INNER),
111 ];
112 }
113}