Updated ninja spyc test package to require http-api
[ninja.git] / src / generators / orm / structure.php
blob1cf279cea848c990489e07b7e65652b9ae8a908e
1 <?php
3 $tables = array (
4 'columns' =>
5 array (
6 'class' => 'Column',
7 'source' => 'LS',
8 'key' => array('name', 'table'),
9 'structure' =>
10 array (
11 'description' => 'string',
12 'name' => 'string',
13 'table' => 'string',
14 'type' => 'string',
17 'commands' =>
18 array (
19 'class' => 'Command',
20 'source' => 'LS',
21 'key' => array('line','name'),
22 'structure' =>
23 array (
24 'line' => 'string',
25 'name' => 'string',
28 'comments' =>
29 array (
30 'class' => 'Comment',
31 'source' => 'LS',
32 'key' => array('id','is_service'),
33 'structure' =>
34 array (
35 'author' => 'string',
36 'comment' => 'string',
37 'entry_time' => 'time',
38 'entry_type' => 'int',
39 'expire_time' => 'time',
40 'expires' => 'int',
41 'host' => array( 'Host', 'host_' ),
42 'id' => 'int',
43 'is_service' => 'int',
44 'persistent' => 'int',
45 'service' => array( 'Service', 'service_' ),
46 'source' => 'int',
47 'type' => 'int',
50 'contactgroups' =>
51 array (
52 'class' => 'ContactGroup',
53 'source' => 'LS',
54 'key' => array('name'),
55 'structure' =>
56 array (
57 'alias' => 'string',
58 'members' => 'list',
59 'name' => 'string',
62 'contacts' =>
63 array (
64 'class' => 'Contact',
65 'source' => 'LS',
66 'key' => array('name'),
67 'structure' =>
68 array (
69 'address1' => 'string',
70 'address2' => 'string',
71 'address3' => 'string',
72 'address4' => 'string',
73 'address5' => 'string',
74 'address6' => 'string',
75 'alias' => 'string',
76 'can_submit_commands' => 'int',
77 'custom_variable_names' => 'list',
78 'custom_variable_values' => 'list',
79 'custom_variables' => 'dict',
80 'email' => 'string',
81 'host_notification_period' => 'string',
82 'host_notifications_enabled' => 'int',
83 'in_host_notification_period' => 'int',
84 'in_service_notification_period' => 'int',
85 'modified_attributes' => 'int',
86 'modified_attributes_list' => 'list',
87 'name' => 'string',
88 'pager' => 'string',
89 'service_notification_period' => 'string',
90 'service_notifications_enabled' => 'int',
93 'downtimes' =>
94 array (
95 'class' => 'Downtime',
96 'source' => 'LS',
97 'key' => array('id', 'is_service'),
98 'structure' =>
99 array (
100 'author' => 'string',
101 'comment' => 'string',
102 'duration' => 'int',
103 'end_time' => 'time',
104 'entry_time' => 'time',
105 'fixed' => 'int',
106 'host' => array( 'Host', 'host_' ),
107 'id' => 'int',
108 'is_service' => 'int',
109 'service' => array( 'Service', 'service_' ),
110 'start_time' => 'time',
111 'triggered_by' => 'int',
112 'type' => 'int',
115 'hostgroups' =>
116 array (
117 'class' => 'HostGroup',
118 'source' => 'LS',
119 'key' => array('name'),
120 'structure' =>
121 array (
122 'action_url' => 'string',
123 'alias' => 'string',
124 'members' => 'list',
125 'members_with_state' => 'list',
126 'name' => 'string',
127 'notes' => 'string',
128 'notes_url' => 'string',
129 'num_hosts' => 'int',
130 'num_hosts_down' => 'int',
131 'num_hosts_pending' => 'int',
132 'num_hosts_unreach' => 'int',
133 'num_hosts_up' => 'int',
134 'num_services' => 'int',
135 'num_services_crit' => 'int',
136 'num_services_hard_crit' => 'int',
137 'num_services_hard_ok' => 'int',
138 'num_services_hard_unknown' => 'int',
139 'num_services_hard_warn' => 'int',
140 'num_services_ok' => 'int',
141 'num_services_pending' => 'int',
142 'num_services_unknown' => 'int',
143 'num_services_warn' => 'int',
144 'worst_host_state' => 'int',
145 'worst_service_hard_state' => 'int',
146 'worst_service_state' => 'int',
149 'hosts' =>
150 array (
151 'class' => 'Host',
152 'source' => 'LS',
153 'key' => array('name'),
154 'rename' => array(
155 'notes_url' => 'notes_url_expanded',
156 'action_url' => 'action_url_expanded',
157 'notes' => 'notes_expanded',
158 'perf_data_raw' => 'perf_data',
159 'icon_image' => 'icon_image_expanded'
161 'structure' =>
162 array (
163 'accept_passive_checks' => 'int',
164 'acknowledged' => 'int',
165 'acknowledgement_type' => 'int',
166 'action_url' => 'string',
167 // 'action_url_expanded' => 'string',
168 'active_checks_enabled' => 'int',
169 'address' => 'string',
170 'alias' => 'string',
171 'check_command' => 'string',
172 'check_flapping_recovery_notification' => 'int',
173 'check_freshness' => 'int',
174 'check_interval' => 'float',
175 'check_options' => 'int',
176 'check_period' => 'string',
177 'check_type' => 'int',
178 'checks_enabled' => 'int',
179 'childs' => 'list',
180 'comments' => 'list',
181 'comments_with_info' => 'list',
182 'contact_groups' => 'list',
183 'contacts' => 'list',
184 'current_attempt' => 'int',
185 'current_notification_number' => 'int',
186 'custom_variable_names' => 'list',
187 'custom_variable_values' => 'list',
188 'custom_variables' => 'dict',
189 'display_name' => 'string',
190 'downtimes' => 'list',
191 'downtimes_with_info' => 'list',
192 'event_handler' => 'string',
193 'event_handler_enabled' => 'int',
194 'execution_time' => 'float',
195 'filename' => 'string',
196 'first_notification_delay' => 'float',
197 'flap_detection_enabled' => 'int',
198 'groups' => 'list',
199 'hard_state' => 'int',
200 'has_been_checked' => 'int',
201 'high_flap_threshold' => 'float',
202 'hourly_value' => 'int',
203 'icon_image' => 'string',
204 'icon_image_alt' => 'string',
205 // 'icon_image_expanded' => 'string',
206 'in_check_period' => 'int',
207 'in_notification_period' => 'int',
208 'initial_state' => 'int',
209 'is_executing' => 'int',
210 'is_flapping' => 'int',
211 'last_check' => 'time',
212 'last_hard_state' => 'int',
213 'last_hard_state_change' => 'time',
214 'last_notification' => 'time',
215 'last_state' => 'int',
216 'last_state_change' => 'time',
217 'last_time_down' => 'time',
218 'last_time_unreachable' => 'time',
219 'last_time_up' => 'time',
220 'latency' => 'float',
221 'long_plugin_output' => 'string',
222 'low_flap_threshold' => 'float',
223 'max_check_attempts' => 'int',
224 'modified_attributes' => 'int',
225 'modified_attributes_list' => 'list',
226 'name' => 'string',
227 'next_check' => 'time',
228 'next_notification' => 'time',
229 'no_more_notifications' => 'int',
230 'notes' => 'string',
231 // 'notes_expanded' => 'string',
232 'notes_url' => 'string',
233 // 'notes_url_expanded' => 'string',
234 'notification_interval' => 'float',
235 'notification_period' => 'string',
236 'notifications_enabled' => 'int',
237 'num_services' => 'int',
238 'num_services_crit' => 'int',
239 'num_services_hard_crit' => 'int',
240 'num_services_hard_ok' => 'int',
241 'num_services_hard_unknown' => 'int',
242 'num_services_hard_warn' => 'int',
243 'num_services_ok' => 'int',
244 'num_services_pending' => 'int',
245 'num_services_unknown' => 'int',
246 'num_services_warn' => 'int',
247 'obsess' => 'int',
248 'parents' => 'list',
249 'pending_flex_downtime' => 'int',
250 'percent_state_change' => 'float',
251 'perf_data_raw' => 'string',
252 'plugin_output' => 'string',
253 'pnpgraph_present' => 'int',
254 'process_performance_data' => 'int',
255 'retry_interval' => 'float',
256 'scheduled_downtime_depth' => 'int',
257 'services' => 'list',
258 'services_with_info' => 'list',
259 'services_with_state' => 'list',
260 'should_be_scheduled' => 'int',
261 'state' => 'int',
262 'state_type' => 'int',
263 'statusmap_image' => 'string',
264 'total_services' => 'int',
265 'worst_service_hard_state' => 'int',
266 'worst_service_state' => 'int',
267 'check_source' => 'string',
269 'x_3d' => 'float',
270 'y_3d' => 'float',
271 'z_3d' => 'float',
275 'servicegroups' =>
276 array (
277 'class' => 'ServiceGroup',
278 'source' => 'LS',
279 'key' => array('name'),
280 'structure' =>
281 array (
282 'action_url' => 'string',
283 'alias' => 'string',
284 'members' => 'list',
285 'members_with_state' => 'list',
286 'name' => 'string',
287 'notes' => 'string',
288 'notes_url' => 'string',
289 'num_services' => 'int',
290 'num_services_crit' => 'int',
291 'num_services_hard_crit' => 'int',
292 'num_services_hard_ok' => 'int',
293 'num_services_hard_unknown' => 'int',
294 'num_services_hard_warn' => 'int',
295 'num_services_ok' => 'int',
296 'num_services_pending' => 'int',
297 'num_services_unknown' => 'int',
298 'num_services_warn' => 'int',
299 'worst_service_state' => 'int',
302 'services' =>
303 array (
304 'class' => 'Service',
305 'source' => 'LS',
306 'key' => array('host.name', 'description'),
307 'default_sort' => array('host.name asc', 'description asc'),
308 'rename' => array(
309 'notes_url' => 'notes_url_expanded',
310 'action_url' => 'action_url_expanded',
311 'notes' => 'notes_expanded',
312 'perf_data_raw' => 'perf_data',
313 'icon_image' => 'icon_image_expanded'
315 'structure' =>
316 array (
317 'accept_passive_checks' => 'int',
318 'acknowledged' => 'int',
319 'acknowledgement_type' => 'int',
320 'action_url' => 'string',
321 // 'action_url_expanded' => 'string',
322 'active_checks_enabled' => 'int',
323 'check_command' => 'string',
324 'check_freshness' => 'int',
325 'check_interval' => 'float',
326 'check_options' => 'int',
327 'check_period' => 'string',
328 'check_type' => 'int',
329 'checks_enabled' => 'int',
330 'comments' => 'list',
331 'comments_with_info' => 'list',
332 'contact_groups' => 'list',
333 'contacts' => 'list',
334 'current_attempt' => 'int',
335 'current_notification_number' => 'int',
336 'custom_variable_names' => 'list',
337 'custom_variable_values' => 'list',
338 'custom_variables' => 'dict',
339 'description' => 'string',
340 'display_name' => 'string',
341 'downtimes' => 'list',
342 'downtimes_with_info' => 'list',
343 'event_handler' => 'string',
344 'event_handler_enabled' => 'int',
345 'execution_time' => 'float',
346 'first_notification_delay' => 'float',
347 'flap_detection_enabled' => 'int',
348 'groups' => 'list',
349 'has_been_checked' => 'int',
350 'high_flap_threshold' => 'float',
351 'host' => array( 'Host', 'host_' ),
352 'hourly_value' => 'int',
353 'icon_image' => 'string',
354 'icon_image_alt' => 'string',
355 // 'icon_image_expanded' => 'string',
356 'in_check_period' => 'int',
357 'in_notification_period' => 'int',
358 'initial_state' => 'int',
359 'is_executing' => 'int',
360 'is_flapping' => 'int',
361 'last_check' => 'time',
362 'last_hard_state' => 'int',
363 'last_hard_state_change' => 'time',
364 'last_notification' => 'time',
365 'last_state' => 'int',
366 'last_state_change' => 'time',
367 'last_time_critical' => 'time',
368 'last_time_ok' => 'time',
369 'last_time_unknown' => 'time',
370 'last_time_warning' => 'time',
371 'latency' => 'float',
372 'long_plugin_output' => 'string',
373 'low_flap_threshold' => 'float',
374 'max_check_attempts' => 'int',
375 'modified_attributes' => 'int',
376 'modified_attributes_list' => 'list',
377 'next_check' => 'time',
378 'next_notification' => 'time',
379 'no_more_notifications' => 'int',
380 'notes' => 'string',
381 // 'notes_expanded' => 'string',
382 'notes_url' => 'string',
383 // 'notes_url_expanded' => 'string',
384 'notification_interval' => 'float',
385 'notification_period' => 'string',
386 'notifications_enabled' => 'int',
387 'obsess' => 'int',
388 'percent_state_change' => 'float',
389 'perf_data_raw' => 'string',
390 'plugin_output' => 'string',
391 'pnpgraph_present' => 'int',
392 'process_performance_data' => 'int',
393 'retry_interval' => 'float',
394 'scheduled_downtime_depth' => 'int',
395 'should_be_scheduled' => 'int',
396 'state' => 'int',
397 'state_type' => 'int',
398 'check_source' => 'string',
401 'status' =>
402 array (
403 'class' => 'Status',
404 'source' => 'LS',
405 'key' => array(),
406 'structure' =>
407 array (
408 'accept_passive_host_checks' => 'int',
409 'accept_passive_service_checks' => 'int',
410 'cached_log_messages' => 'int',
411 'check_external_commands' => 'int',
412 'check_host_freshness' => 'int',
413 'check_service_freshness' => 'int',
414 'connections' => 'int',
415 'connections_rate' => 'float',
416 'enable_event_handlers' => 'int',
417 'enable_flap_detection' => 'int',
418 'enable_notifications' => 'int',
419 'execute_host_checks' => 'int',
420 'execute_service_checks' => 'int',
421 'forks' => 'int',
422 'forks_rate' => 'float',
423 'host_checks' => 'int',
424 'host_checks_rate' => 'float',
425 'interval_length' => 'int',
426 'last_log_rotation' => 'time',
427 'livecheck_overflows' => 'int',
428 'livecheck_overflows_rate' => 'float',
429 'livechecks' => 'int',
430 'livechecks_rate' => 'float',
431 'livestatus_version' => 'string',
432 'log_messages' => 'int',
433 'log_messages_rate' => 'float',
434 'nagios_pid' => 'int',
435 'neb_callbacks' => 'int',
436 'neb_callbacks_rate' => 'float',
437 'num_hosts' => 'int',
438 'num_services' => 'int',
439 'obsess_over_hosts' => 'int',
440 'obsess_over_services' => 'int',
441 'process_performance_data' => 'int',
442 'program_start' => 'time',
443 'program_version' => 'string',
444 'requests' => 'int',
445 'requests_rate' => 'float',
446 'service_checks' => 'int',
447 'service_checks_rate' => 'float',
450 'timeperiods' =>
451 array (
452 'class' => 'TimePeriod',
453 'source' => 'LS',
454 'key' => array('name'),
455 'rename' => array(
456 'is_active' => 'in'
458 'structure' =>
459 array (
460 'alias' => 'string',
461 'is_active' => 'int',
462 'name' => 'string',
465 'notifications' =>
466 array(
467 'class' => 'Notification',
468 'source' => 'SQL',
469 'table' => 'notification',
470 'key' => array('id'),
471 'default_sort' => array('id desc'),
472 'structure' => array(
473 'instance_id' => 'int',
474 'id' => 'int',
475 'notification_type' => 'int',
476 'start_time' => 'int',
477 'end_time' => 'int',
478 'contact_name' => 'string',
479 'host_name' => 'string',
480 'service_description' => 'string',
481 'command_name' => 'string',
482 'reason_type' => 'int',
483 'state' => 'int',
484 'output' => 'string',
485 'ack_author' => 'string',
486 'ack_data' => 'string',
487 'escalated' => 'int',
488 'contacts_notified' => 'int',
491 'saved_filters' =>
492 array(
493 'class' => 'SavedFilter',
494 'source' => 'SQL',
495 'table' => 'ninja_saved_filters',
496 'key' => array('id'),
497 'default_sort' => array('filter_name asc'),
498 'structure' => array(
499 'id' => 'int',
500 'username' => 'string',
501 'filter_name' => 'string',
502 'filter_table' => 'string',
503 'filter' => 'string',
504 'filter_description' => 'string'
507 'recurring_downtimes' =>
508 array(
509 'class' => 'RecurringDowntime',
510 'source' => 'SQL',
511 'table' => 'recurring_downtime',
512 'key' => array('id'),
513 'default_sort' => array('last_update'),
514 'structure' => array(
515 'id' => 'int',
516 'author' => 'string',
517 'downtime_type' => 'string',
518 'last_update' => 'int',
519 'comment' => 'string',
520 'start_time' => 'int',
521 'end_time' => 'int',
522 'duration' => 'int',
523 'fixed' => 'int',
524 'weekdays' => 'list',
525 'months' => 'list'
531 'log' =>
532 array (
533 'class' => 'LogEntry',
534 'structure' =>
535 array (
536 'attempt' => 'int',
537 'class' => 'int',
538 'command_name' => 'string',
539 'comment' => 'string',
540 'contact_name' => 'string',
541 'current_command_line' => 'string',
542 'current_command_name' => 'string',
543 'current_contact' => array( 'Contact', 'current_contact_' ),
544 'current_host' => array( 'Host', 'current_host_' ),
545 'current_service' => array( 'Service', 'current_service_' ),
546 'host_name' => 'string',
547 'lineno' => 'int',
548 'message' => 'string',
549 'options' => 'string',
550 'plugin_output' => 'string',
551 'service_description' => 'string',
552 'state' => 'int',
553 'state_type' => 'string',
554 'time' => 'time',
555 'type' => 'string',
558 'hostsbygroup' =>
559 array (
560 'class' => 'HostByGroup',
561 'structure' =>
562 array (
563 'host' => array( 'Host', '' ),
564 'hostgroup' => array( 'HostGroup', 'hostgroup_' ),
567 'servicesbygroup' =>
568 array (
569 'class' => 'ServiceByGroup',
570 'structure' =>
571 array (
572 'service' => array( 'Service', '' ),
573 'servicegroup' => array( 'ServiceGroup', 'servicegroup_' ),
576 'servicesbyhostgroup' =>
577 array (
578 'class' => 'ServiceByHostGroup',
579 'structure' =>
580 array (
581 'service' => array( 'Service', '' ),
582 'hostgroup' => array( 'HostGroup', 'hostgroup_' ),