Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
copyqueue.php
1<?php
2namespace Bitrix\Clouds;
3
6Loc::loadMessages(__FILE__);
7
44class CopyQueueTable extends Main\Entity\DataManager
45{
46 const OP_COPY = 'C';
47 const OP_RENAME = 'R';
48 const OP_SYNC = 'S';
54 public static function getTableName()
55 {
56 return 'b_clouds_copy_queue';
57 }
58
64 public static function getMap()
65 {
66 return array(
67 'ID' => array(
68 'data_type' => 'integer',
69 'primary' => true,
70 'autocomplete' => true,
71 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_ID_FIELD'),
72 ),
73 'TIMESTAMP_X' => array(
74 'data_type' => 'datetime',
75 'required' => true,
76 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_TIMESTAMP_X_FIELD'),
77 ),
78 'OP' => array(
79 'data_type' => 'enum',
80 'values' => array('C', 'R', 'S'),
81 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_OP_FIELD'),
82 ),
83 'SOURCE_BUCKET_ID' => array(
84 'data_type' => 'integer',
85 'required' => true,
86 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_SOURCE_BUCKET_ID_FIELD'),
87 ),
88 'SOURCE_FILE_PATH' => array(
89 'data_type' => 'string',
90 'required' => true,
91 'validation' => array(__CLASS__, 'validateSourceFilePath'),
92 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_SOURCE_FILE_PATH_FIELD'),
93 ),
94 'TARGET_BUCKET_ID' => array(
95 'data_type' => 'integer',
96 'required' => true,
97 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_TARGET_BUCKET_ID_FIELD'),
98 ),
99 'TARGET_FILE_PATH' => array(
100 'data_type' => 'string',
101 'required' => true,
102 'validation' => array(__CLASS__, 'validateTargetFilePath'),
103 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_TARGET_FILE_PATH_FIELD'),
104 ),
105 'FILE_SIZE' => array(
106 'data_type' => 'integer',
107 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_FILE_SIZE_FIELD'),
108 ),
109 'FILE_POS' => array(
110 'data_type' => 'integer',
111 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_FILE_POS_FIELD'),
112 ),
113 'FAIL_COUNTER' => array(
114 'data_type' => 'integer',
115 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_FAIL_COUNTER_FIELD'),
116 ),
117 'STATUS' => array(
118 'data_type' => 'enum',
119 'values' => array('Y', 'F'),
120 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_STATUS_FIELD'),
121 ),
122 'ERROR_MESSAGE' => array(
123 'data_type' => 'string',
124 'validation' => array(__CLASS__, 'validateErrorMessage'),
125 'title' => Loc::getMessage('COPY_QUEUE_ENTITY_ERROR_MESSAGE_FIELD'),
126 ),
127 'SOURCE_BUCKET' => array(
128 'data_type' => 'Bitrix\\Clouds\\FileBucket',
129 'reference' => array('=this.SOURCE_BUCKET_ID' => 'ref.ID'),
130 ),
131 'TARGET_BUCKET' => array(
132 'data_type' => 'Bitrix\\Clouds\\FileBucket',
133 'reference' => array('=this.TARGET_BUCKET_ID' => 'ref.ID'),
134 ),
135 );
136 }
142 public static function validateSourceFilePath()
143 {
144 return array(
145 new Main\Entity\Validator\Length(0, 500),
146 );
147 }
153 public static function validateTargetFilePath()
154 {
155 return array(
156 new Main\Entity\Validator\Length(0, 500),
157 );
158 }
164 public static function validateContentType()
165 {
166 return array(
167 new Main\Entity\Validator\Length(0, 500),
168 );
169 }
175 public static function validateErrorMessage()
176 {
177 return array(
178 new Main\Entity\Validator\Length(0, 500),
179 );
180 }
181}
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29