Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
linktask.php
1<?php
2namespace Bitrix\Im\Model;
3
5use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
11
42{
43 use DeleteByFilterTrait;
44
50 public static function getTableName()
51 {
52 return 'b_im_link_task';
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 'nullable' => true
74 ]
75 ),
76 'CHAT_ID' => new IntegerField(
77 'CHAT_ID',
78 [
79 ]
80 ),
81 'TASK_ID' => new IntegerField(
82 'TASK_ID',
83 [
84 ]
85 ),
86 'AUTHOR_ID' => new IntegerField(
87 'AUTHOR_ID',
88 [
89 ]
90 ),
91 'DATE_CREATE' => new DatetimeField(
92 'DATE_CREATE',
93 [
94 'required' => true,
95 'default_value' => static function() {
96 return new DateTime();
97 }
98 ]
99 ),
100 'MESSAGE' => (new Reference(
101 'MESSAGE',
102 MessageTable::class,
103 Join::on('this.MESSAGE_ID', 'ref.ID')
104 ))->configureJoinType(Join::TYPE_INNER),
105 'CHAT' => (new Reference(
106 'CHAT',
107 ChatTable::class,
108 Join::on('this.CHAT_ID', 'ref.ID')
109 ))->configureJoinType(Join::TYPE_INNER),
110 'AUTHOR' => (new Reference(
111 'AUTHOR',
112 \Bitrix\Main\UserTable::class,
113 Join::on('this.AUTHOR_ID', 'ref.ID')
114 ))->configureJoinType(Join::TYPE_INNER),
115 ];
116 }
117}