Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
bottoken.php
1
<?php
2
namespace
Bitrix\Im\Model
;
3
4
use
Bitrix\Main\Entity
;
5
35
class
BotTokenTable
extends
Entity\DataManager
36
{
42
public
static
function
getTableName
()
43
{
44
return
'b_im_bot_token'
;
45
}
46
52
public
static
function
getMap
()
53
{
54
return
array(
55
'ID'
=> array(
56
'data_type'
=>
'integer'
,
57
'primary'
=>
true
,
58
'autocomplete'
=>
true
,
59
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_ID_FIELD'),
60
),
61
'TOKEN'
=> array(
62
'data_type'
=>
'string'
,
63
'validation'
=> array(__CLASS__,
'validateToken'
),
64
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_TOKEN_FIELD'),
65
),
66
'DATE_CREATE'
=> array(
67
'data_type'
=>
'datetime'
,
68
'required'
=>
true
,
69
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_DATE_CREATE_FIELD'),
70
'default_value'
=> array(__CLASS__,
'getCurrentDate'
),
71
),
72
'DATE_EXPIRE'
=> array(
73
'data_type'
=>
'datetime'
,
74
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_DATE_EXPIRE_FIELD'),
75
),
76
'BOT_ID'
=> array(
77
'data_type'
=>
'integer'
,
78
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_BOT_ID_FIELD'),
79
),
80
'DIALOG_ID'
=> array(
81
'data_type'
=>
'string'
,
82
'required'
=>
true
,
83
'validation'
=> array(__CLASS__,
'validateDialogId'
),
84
//'title' => Loc::getMessage('BOT_TOKEN_ENTITY_DIALOG_ID_FIELD'),
85
),
86
);
87
}
88
94
public
static
function
validateToken
()
95
{
96
return
array(
97
new
Entity
\Validator\Length(
null
, 32),
98
);
99
}
100
106
public
static
function
validateDialogId
()
107
{
108
return
array(
109
new
Entity
\Validator\Length(
null
, 255),
110
);
111
}
112
118
public
static
function
getCurrentDate
()
119
{
120
return
new \Bitrix\Main\Type\DateTime();
121
}
122
}
Bitrix\Im\Model\BotTokenTable
Definition
bottoken.php:36
Bitrix\Im\Model\BotTokenTable\getCurrentDate
static getCurrentDate()
Definition
bottoken.php:118
Bitrix\Im\Model\BotTokenTable\getMap
static getMap()
Definition
bottoken.php:52
Bitrix\Im\Model\BotTokenTable\validateDialogId
static validateDialogId()
Definition
bottoken.php:106
Bitrix\Im\Model\BotTokenTable\validateToken
static validateToken()
Definition
bottoken.php:94
Bitrix\Im\Model\BotTokenTable\getTableName
static getTableName()
Definition
bottoken.php:42
Bitrix\Main\ORM\Entity
Definition
entity.php:26
Bitrix\Im\V2\Sync\Entity
Definition
Entity.php:6
Bitrix\Im\Model
Definition
alias.php:2
modules
im
lib
model
bottoken.php
Создано системой
1.10.0