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