Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
chat.php
1<?php
3
4use \Bitrix\Main\Entity;
5use \Bitrix\Main\Localization\Loc;
6
7Loc::loadMessages(__FILE__);
8
25class ChatTable extends Entity\DataManager
26{
31 public static function getTableName()
32 {
33 return 'b_landing_chat';
34 }
35
40 public static function getMap()
41 {
42 return array(
43 'ID' => new Entity\IntegerField('ID', array(
44 'title' => 'ID',
45 'primary' => true
46 )),
47 'CHAT_ID' => new Entity\IntegerField('CHAT_ID', array(
48 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CHAT_ID'),
49 'required' => true
50 )),
51 'TITLE' => new Entity\StringField('TITLE', array(
52 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CHAT_TITLE'),
53 'required' => true
54 )),
55 'AVATAR' => new Entity\IntegerField('AVATAR', array(
56 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CHAT_AVATAR')
57 )),
58 'CREATED_BY_ID' => new Entity\IntegerField('CREATED_BY_ID', array(
59 'title' => Loc::getMessage('LANDING_TABLE_FIELD_CREATED_BY_ID'),
60 'required' => true
61 )),
62 'CREATED_BY' => new Entity\ReferenceField(
63 'CREATED_BY',
64 'Bitrix\Main\UserTable',
65 array('=this.CREATED_BY_ID' => 'ref.ID')
66 ),
67 'MODIFIED_BY_ID' => new Entity\IntegerField('MODIFIED_BY_ID', array(
68 'title' => Loc::getMessage('LANDING_TABLE_FIELD_MODIFIED_BY_ID'),
69 'required' => true
70 )),
71 'MODIFIED_BY' => new Entity\ReferenceField(
72 'MODIFIED_BY',
73 'Bitrix\Main\UserTable',
74 array('=this.MODIFIED_BY_ID' => 'ref.ID')
75 ),
76 'DATE_CREATE' => new Entity\DatetimeField('DATE_CREATE', array(
77 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_CREATE'),
78 'required' => true
79 )),
80 'DATE_MODIFY' => new Entity\DatetimeField('DATE_MODIFY', array(
81 'title' => Loc::getMessage('LANDING_TABLE_FIELD_DATE_MODIFY'),
82 'required' => true
83 ))
84 );
85 }
86}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29