1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
script.php
См. документацию.
1<?php
2
4
7
24class ScriptTable extends Main\Entity\DataManager
25{
29 public static function getTableName()
30 {
31 return 'b_bp_script';
32 }
33
37 public static function getMap()
38 {
39 return [
40 'ID' => [
41 'data_type' => 'integer',
42 'primary' => true,
43 'autocomplete' => true,
44 ],
45 'MODULE_ID' => [
46 'data_type' => 'string'
47 ],
48 'ENTITY' => [
49 'data_type' => 'string'
50 ],
51 'DOCUMENT_TYPE' => [
52 'data_type' => 'string'
53 ],
54 'NAME' => [
55 'data_type' => 'string'
56 ],
57 'DESCRIPTION' => [
58 'data_type' => 'string'
59 ],
60 'WORKFLOW_TEMPLATE_ID' => [
61 'data_type' => 'integer'
62 ],
63 'WORKFLOW_TEMPLATE' => array(
64 'data_type' => \Bitrix\Bizproc\Workflow\Template\Entity\WorkflowTemplateTable::class,
65 'reference' => array(
66 '=this.WORKFLOW_TEMPLATE_ID' => 'ref.ID'
67 ),
68 'join_type' => 'LEFT'
69 ),
70 'CREATED_DATE' => [
71 'data_type' => 'datetime'
72 ],
73 'CREATED_BY' => [
74 'data_type' => 'integer'
75 ],
76 'MODIFIED_DATE' => [
77 'data_type' => 'datetime'
78 ],
79 'MODIFIED_BY' => [
80 'data_type' => 'integer'
81 ],
82 'ORIGINATOR_ID' => [
83 'data_type' => 'string'
84 ],
85 'ORIGIN_ID' => [
86 'data_type' => 'string'
87 ],
88 'SORT' => [
89 'data_type' => 'integer',
90 'default_value' => 10
91 ],
92 'ACTIVE' => [
93 'data_type' => 'boolean',
94 'values' => ['N', 'Y'],
95 'default_value' => 'Y'
96 ],
97 ];
98 }
99 public static function getQueueCount(int $scriptId): int
100 {
101 return ScriptQueueTable::getCount(['=SCRIPT_ID' => $scriptId]);
102 }
103
104 public static function getActiveQueueCount(int $scriptId): int
105 {
106 return ScriptQueueTable::getCount(
107 [
108 '=SCRIPT_ID' => $scriptId,
109 '@STATUS' => [Status::QUEUED, Status::EXECUTING]
110 ]
111 );
112 }
113
114 public static function getLastStartedDate(int $scriptId): ?Main\Type\DateTime
115 {
116 $row = ScriptQueueTable::getList(
117 [
118 'filter' => ['=SCRIPT_ID' => $scriptId],
119 'order' => ['STARTED_DATE' => 'DESC'],
120 'limit' => 1,
121 'select' => ['STARTED_DATE']
122 ]
123 )->fetch();
124
125 return $row? $row['STARTED_DATE'] : null;
126 }
127}
static getLastStartedDate(int $scriptId)
Определения script.php:114
static getQueueCount(int $scriptId)
Определения script.php:99
static getActiveQueueCount(int $scriptId)
Определения script.php:104
static getTableName()
Определения script.php:29
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
Определения ufield.php:9
Определения collection.php:2