Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
fileupload.php
1<?php
2namespace Bitrix\Clouds;
3
6Loc::loadMessages(__FILE__);
7
42class FileUploadTable extends Main\Entity\DataManager
43{
49 public static function getTableName()
50 {
51 return 'b_clouds_file_upload';
52 }
53
59 public static function getMap()
60 {
61 return array(
62 'ID' => array(
63 'data_type' => 'string',
64 'primary' => true,
65 'validation' => array(__CLASS__, 'validateId'),
66 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_ID_FIELD'),
67 ),
68 'TIMESTAMP_X' => array(
69 'data_type' => 'datetime',
70 'required' => true,
71 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_TIMESTAMP_X_FIELD'),
72 ),
73 'FILE_PATH' => array(
74 'data_type' => 'string',
75 'required' => true,
76 'validation' => array(__CLASS__, 'validateFilePath'),
77 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_FILE_PATH_FIELD'),
78 ),
79 'FILE_SIZE' => array(
80 'data_type' => 'integer',
81 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_FILE_SIZE_FIELD'),
82 ),
83 'TMP_FILE' => array(
84 'data_type' => 'string',
85 'validation' => array(__CLASS__, 'validateTmpFile'),
86 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_TMP_FILE_FIELD'),
87 ),
88 'BUCKET_ID' => array(
89 'data_type' => 'integer',
90 'required' => true,
91 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_BUCKET_ID_FIELD'),
92 ),
93 'PART_SIZE' => array(
94 'data_type' => 'integer',
95 'required' => true,
96 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_PART_SIZE_FIELD'),
97 ),
98 'PART_NO' => array(
99 'data_type' => 'integer',
100 'required' => true,
101 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_PART_NO_FIELD'),
102 ),
103 'PART_FAIL_COUNTER' => array(
104 'data_type' => 'integer',
105 'required' => true,
106 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_PART_FAIL_COUNTER_FIELD'),
107 ),
108 'NEXT_STEP' => array(
109 'data_type' => 'text',
110 'title' => Loc::getMessage('FILE_UPLOAD_ENTITY_NEXT_STEP_FIELD'),
111 ),
112 'BUCKET' => array(
113 'data_type' => 'Bitrix\Clouds\FileBucket',
114 'reference' => array('=this.BUCKET_ID' => 'ref.ID'),
115 ),
116 );
117 }
123 public static function validateId()
124 {
125 return array(
126 new Main\Entity\Validator\Length(0, 32),
127 );
128 }
134 public static function validateFilePath()
135 {
136 return array(
137 new Main\Entity\Validator\Length(0, 500),
138 );
139 }
145 public static function validateTmpFile()
146 {
147 return array(
148 new Main\Entity\Validator\Length(0, 500),
149 );
150 }
151}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29