Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
filetemporary.php
1
<?php
2
namespace
Bitrix\Im\Model
;
3
4
use
Bitrix\Main\ORM\Data\DataManager
;
5
use Bitrix\Main\ORM\Data\Internal\DeleteByFilterTrait;
6
use
Bitrix\Main\ORM\Fields\DatetimeField
;
7
use
Bitrix\Main\ORM\Fields\IntegerField
;
8
use
Bitrix\Main\ORM\Fields\StringField
;
9
use
Bitrix\Main\ORM\Fields\Validators\LengthValidator
;
10
use
Bitrix\Main\Type\DateTime
;
11
39
class
FileTemporaryTable
extends
DataManager
40
{
41
use DeleteByFilterTrait;
42
48
public
static
function
getTableName
()
49
{
50
return
'b_im_file_temporary'
;
51
}
52
58
public
static
function
getMap
()
59
{
60
return
[
61
'ID'
=>
new
IntegerField
(
62
'ID'
,
63
[
64
'primary'
=>
true
,
65
'autocomplete'
=>
true
,
66
]
67
),
68
'DISK_FILE_ID'
=>
new
IntegerField
(
69
'DISK_FILE_ID'
,
70
[
71
'required'
=>
true
,
72
]
73
),
74
'DATE_CREATE'
=>
new
DatetimeField
(
75
'DATE_CREATE'
,
76
[
77
'required'
=>
true
,
78
'default_value'
=>
static
function
() {
79
return
new
DateTime
();
80
}
81
]
82
),
83
'SOURCE'
=>
new
StringField
(
84
'SOURCE'
,
85
[
86
'required'
=>
true
,
87
'validation'
=> [__CLASS__,
'validateSource'
],
88
]
89
),
90
];
91
}
92
98
public
static
function
validateSource
(): array
99
{
100
return
[
101
new
LengthValidator
(
null
, 50),
102
];
103
}
104
}
Bitrix\Im\Model\FileTemporaryTable
Definition
filetemporary.php:40
Bitrix\Im\Model\FileTemporaryTable\getMap
static getMap()
Definition
filetemporary.php:58
Bitrix\Im\Model\FileTemporaryTable\validateSource
static validateSource()
Definition
filetemporary.php:98
Bitrix\Im\Model\FileTemporaryTable\getTableName
static getTableName()
Definition
filetemporary.php:48
Bitrix\Main\ORM\Data\DataManager
Definition
datamanager.php:33
Bitrix\Main\ORM\Fields\DatetimeField
Definition
datetimefield.php:22
Bitrix\Main\ORM\Fields\IntegerField
Definition
integerfield.php:20
Bitrix\Main\ORM\Fields\StringField
Definition
stringfield.php:20
Bitrix\Main\ORM\Fields\Validators\LengthValidator
Definition
lengthvalidator.php:19
Bitrix\Main\Type\DateTime
Definition
datetime.php:9
Bitrix\Im\Model
Definition
alias.php:2
modules
im
lib
model
filetemporary.php
Создано системой
1.10.0