Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
externalavatar.php
1<?php
2namespace Bitrix\Im\Model;
3
5
32class ExternalAvatarTable extends Main\Entity\DataManager
33{
39 public static function getTableName()
40 {
41 return 'b_im_external_avatar';
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 //'title' => Loc::getMessage('EXTERNAL_AVATAR_ENTITY_ID_FIELD'),
57 ),
58 'LINK_MD5' => array(
59 'data_type' => 'string',
60 'required' => true,
61 'validation' => array(__CLASS__, 'validateLinkMd5'),
62 //'title' => Loc::getMessage('EXTERNAL_AVATAR_ENTITY_LINK_MD5_FIELD'),
63 ),
64 'AVATAR_ID' => array(
65 'data_type' => 'integer',
66 'required' => true,
67 //'title' => Loc::getMessage('EXTERNAL_AVATAR_ENTITY_AVATAR_ID_FIELD'),
68 ),
69 'FILE' => array(
70 'data_type' => 'Bitrix\Main\FileTable',
71 'reference' => array('=this.AVATAR_ID' => 'ref.ID'),
72 'join_type' => 'LEFT',
73 ),
74 );
75 }
81 public static function validateLinkMd5()
82 {
83 return array(
84 new Main\Entity\Validator\Length(null, 32),
85 );
86 }
87}