Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
scriptqueuedocument.php
1<?php
2
4
6
23class ScriptQueueDocumentTable extends Main\Entity\DataManager
24{
28 public static function getTableName()
29 {
30 return 'b_bp_script_queue_document';
31 }
32
36 public static function getMap()
37 {
38 return [
39 'ID' => [
40 'data_type' => 'integer',
41 'primary' => true,
42 ],
43 'QUEUE_ID' => [
44 'data_type' => 'integer'
45 ],
46 'DOCUMENT_ID' => [
47 'data_type' => 'string'
48 ],
49 'WORKFLOW_ID' => [
50 'data_type' => 'string'
51 ],
52 'STATUS' => [
53 'data_type' => 'integer'
54 ],
55 'STATUS_MESSAGE' => [
56 'data_type' => 'string'
57 ],
58 'QUEUE' => [
59 'data_type' => ScriptQueueTable::class,
60 'reference' => array(
61 '=this.QUEUE_ID' => 'ref.ID'
62 ),
63 ]
64 ];
65 }
66
67 public static function deleteByQueue(int $queueId)
68 {
69 $result = static::getList(['filter' => ['=QUEUE_ID' => $queueId], 'select' => ['ID']]);
70
71 foreach ($result as $row)
72 {
73 static::delete($row['ID']);
74 }
75 }
76}