uddf 0.2.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,783 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "happymapper"
4
+ require "uddf/base/models"
5
+
6
+ module UDDF
7
+ module V330
8
+ module Models
9
+ class Timer
10
+ include HappyMapper
11
+
12
+ tag "timer"
13
+
14
+ attribute :ref, String
15
+ content :value, Float
16
+ end
17
+
18
+ class SelfTest
19
+ include HappyMapper
20
+
21
+ tag "selftest"
22
+
23
+ attribute :ref, String
24
+ content :Value, String
25
+ end
26
+
27
+ class RebreatherSelfTest
28
+ include HappyMapper
29
+
30
+ tag "rebreatherselftest"
31
+
32
+ attribute :ref, String
33
+ content :value, String
34
+ end
35
+
36
+ class DeepStops
37
+ include HappyMapper
38
+
39
+ tag "deepstops"
40
+
41
+ has_one :deep_stop_time, Float, tag: "deepstoptime"
42
+ has_one :deep_stop_type, String, tag: "deepstoptype"
43
+ end
44
+
45
+ class ScrubberMonitor
46
+ include HappyMapper
47
+
48
+ tag "scrubbermonitor"
49
+
50
+ attribute :id, String
51
+ end
52
+
53
+ class Scrubber
54
+ include HappyMapper
55
+
56
+ tag "scrubber"
57
+
58
+ attribute :ref, String
59
+ attribute :units, String
60
+
61
+ content :value, Float
62
+ end
63
+
64
+ class WayAltitude
65
+ include HappyMapper
66
+
67
+ tag "wayaltitude"
68
+
69
+ attribute :way_time, Float
70
+ content :value, Float
71
+ end
72
+
73
+ class ExposureToAltitude
74
+ include HappyMapper
75
+
76
+ tag "exposuretoaltitude"
77
+
78
+ has_one :altitude_of_exposure, Float, tag: "altitudeofexposure"
79
+ has_one :date_of_flight, Base::Models::DateTimeField, tag: "dateofflight"
80
+ has_one :surface_interval_before_altitude_exposure, Float, tag: "surfaceintervalbeforealtitudeexposure"
81
+ has_one :total_length_of_exposure, Float, tag: "totallengthofexposure"
82
+ has_one :transportation, String
83
+ end
84
+
85
+ class SurfaceIntervalBeforeDive
86
+ include HappyMapper
87
+
88
+ tag "surfaceintervalbeforedive"
89
+
90
+ has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
91
+ has_one :infinity, String
92
+ has_one :passed_time, Float, tag: "passedtime"
93
+ has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
94
+ end
95
+
96
+ class SurfaceIntervalAfterDive
97
+ include HappyMapper
98
+
99
+ tag "surfaceintervalafterdive"
100
+
101
+ has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
102
+ has_one :infinity, String
103
+ has_one :passed_time, Float, tag: "passedtime"
104
+ has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
105
+ end
106
+
107
+ class TankPressure
108
+ include HappyMapper
109
+
110
+ tag "tankpressure"
111
+
112
+ attribute :ref, String
113
+ content :value, Float
114
+ end
115
+
116
+ class SwitchMix
117
+ include HappyMapper
118
+
119
+ tag "switchmix"
120
+
121
+ attribute :ref, String
122
+ end
123
+
124
+ class SetPo2
125
+ include HappyMapper
126
+
127
+ tag "setpo2"
128
+
129
+ attribute :set_by, String
130
+ content :value, Float
131
+ end
132
+
133
+ class PPo2
134
+ include HappyMapper
135
+
136
+ tag "ppo2"
137
+
138
+ attribute :ref, String
139
+ content :value, Float
140
+ end
141
+
142
+ class GradientFactor
143
+ include HappyMapper
144
+
145
+ tag "gradientfactor"
146
+
147
+ attribute :tissue, Integer
148
+ content :value, Float
149
+ end
150
+
151
+ class DiveMode
152
+ include HappyMapper
153
+
154
+ tag "divemode"
155
+
156
+ attribute :type, String
157
+ end
158
+
159
+ class Decostop
160
+ include HappyMapper
161
+
162
+ tag "decostop"
163
+
164
+ attribute :kind, String
165
+ attribute :deco_depth, Float
166
+ attribute :duration, Float
167
+ end
168
+
169
+ class Battery
170
+ include HappyMapper
171
+
172
+ tag "battery"
173
+
174
+ attribute :ref, String
175
+ end
176
+
177
+ class BatteryChargeCondition
178
+ include HappyMapper
179
+
180
+ tag "batterychargecondition"
181
+
182
+ attribute :ref, String
183
+ content :value, Float
184
+ end
185
+
186
+ class BatteryVoltage
187
+ include HappyMapper
188
+
189
+ tag "batteryvoltage"
190
+
191
+ attribute :ref, String
192
+ content :value, Float
193
+ end
194
+
195
+ class Alarm
196
+ include HappyMapper
197
+
198
+ tag "alarm"
199
+
200
+ attribute :level, Float
201
+ attribute :tank_ref, String
202
+ content :value, String
203
+ end
204
+
205
+ class Info
206
+ include HappyMapper
207
+
208
+ tag "info"
209
+
210
+ attribute :ref, String
211
+ attribute :level, String
212
+ attribute :type, String
213
+ attribute :values, Float
214
+ attribute :units, String
215
+ end
216
+
217
+ class PPCo2
218
+ include HappyMapper
219
+
220
+ tag "ppco2"
221
+
222
+ attribute :ref, String
223
+
224
+ content :value, Float
225
+ end
226
+
227
+ class Waypoint
228
+ include HappyMapper
229
+
230
+ tag "waypoint"
231
+
232
+ has_many :alarms, Alarm, tag: "alarm"
233
+ has_many :battery_charge_conditions, BatteryChargeCondition, tag: "batterychargecondition"
234
+ has_many :battery_voltages, BatteryVoltage, tag: "batteryvoltage"
235
+ has_one :calculated_po2, Float, tag: "calculatedpo2"
236
+ has_one :cns, Float
237
+ has_many :deco_stops, Decostop, tag: "decostop"
238
+ has_one :depth, Float
239
+ has_one :dive_mode, DiveMode, tag: "divemode"
240
+ has_one :dive_time, Float, tag: "divetime"
241
+ has_one :gradient_factor, GradientFactor, tag: "gradientfactor"
242
+ has_one :heading, Float
243
+ has_many :ppo2s, PPo2, tag: "ppo2"
244
+ has_one :no_deco_time, Float, tag: "nodecotime"
245
+ has_one :otu, Float
246
+ has_one :remaining_bottom_time, Float, tag: "remainingbottomtime"
247
+ has_one :remaining_o2_time, Float, tag: "remainingo2time"
248
+ has_many :set_po2s, SetPo2, tag: "setpo2"
249
+ has_one :switch_mix, SwitchMix, tag: "switchmix"
250
+ has_many :tank_pressures, TankPressure, tag: "tankpressure"
251
+ has_one :temperature, Float
252
+ has_many :timers, Timer, tag: "timer"
253
+ has_many :infos, Info, tag: "info"
254
+ has_many :ppco2s, PPCo2, tag: "ppco2"
255
+ has_many :scrubbers, Scrubber, tag: "scrubber"
256
+ # Added in v3.2.2
257
+ has_one :body_temperature, Float, tag: "bodytemperature"
258
+ has_one :pulse_rate, Float, tag: "pulserate"
259
+ has_many :set_markers, String, tag: "setmarker"
260
+ end
261
+
262
+ class PlannedProfile
263
+ include HappyMapper
264
+
265
+ tag "plannedprofile"
266
+
267
+ attribute :start_dive_mode, String
268
+ attribute :start_mix, String
269
+ has_many :waypoints, Waypoint, tag: "waypoint"
270
+ end
271
+
272
+ class InformationBeforeDive
273
+ include HappyMapper
274
+
275
+ tag "informationbeforedive"
276
+
277
+ has_one :air_temperature, Float, tag: "airtemperature"
278
+ has_one :alcohol_before_dive, Base::Models::AlcoholBeforeDive, tag: "alcoholbeforedive"
279
+ has_one :altitude, Float
280
+ has_one :apparatus, String
281
+ has_one :datetime, DateTime
282
+ has_one :deep_stops, DeepStops, tag: "deepstops"
283
+ has_one :dive_number, Integer, tag: "divenumber"
284
+ has_one :dive_number_of_day, Integer, tag: "divenumberofday"
285
+ has_one :internal_dive_number, Integer, tag: "internaldivenumber"
286
+ has_many :links, Base::Models::Link, tag: "link"
287
+ has_one :medication_before_dive, Base::Models::MedicationBeforeDive, tag: "medicationbeforedive"
288
+ has_one :no_suit, String, tag: "nosuit"
289
+ has_one :planned_profile, PlannedProfile, tag: "plannedprofile"
290
+ has_one :platform, String
291
+ has_one :price, Base::Models::Price
292
+ has_one :purpose, String
293
+ has_many :rebreather_self_tests, RebreatherSelfTest, tag: "rebreatherselftest"
294
+ has_one :state_of_rest_before_dive, String, tag: "stateofrestbeforedive"
295
+ has_many :self_tests, SelfTest, tag: "selftest"
296
+ has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
297
+ has_one :surface_pressure, Float, tag: "surfacepressure"
298
+ has_one :trip_membership, String, tag: "tripmembership"
299
+ has_many :timers, Timer, tag: "timer"
300
+ end
301
+
302
+ class GlobalAlarmsGiven
303
+ include HappyMapper
304
+
305
+ tag "globalalarmsgiven"
306
+
307
+ has_many :global_alarms, String, tag: "globalalarm"
308
+ end
309
+
310
+ class EquipmentUsed
311
+ include HappyMapper
312
+
313
+ tag "equipmentused"
314
+
315
+ has_one :lead_quantity, Float, tag: "leadquantity"
316
+ has_many :links, Base::Models::Link, tag: "link"
317
+ end
318
+
319
+ class InformationAfterDive
320
+ include HappyMapper
321
+
322
+ tag "informationafterdive"
323
+
324
+ has_one :any_symptoms, Base::Models::AnySymptoms, tag: "anysymptoms"
325
+ has_one :average_depth, Float, tag: "averagedepth"
326
+ has_one :current, String
327
+ has_one :desaturation_time, Float, tag: "desaturationtime"
328
+ has_one :dive_duration, Float, tag: "diveduration"
329
+ has_one :dive_plan, String, tag: "diveplan"
330
+ has_one :dive_table, String, tag: "divetable"
331
+ has_one :equipment_malfunction, String, tag: "equipmentmalfunction"
332
+ has_one :equipment_used, EquipmentUsed, tag: "equipmentused"
333
+ has_one :global_alarms_given, GlobalAlarmsGiven, tag: "globalalarmsgiven"
334
+ has_one :greatest_depth, Float, tag: "greatestdepth"
335
+ has_one :highest_po2, Float, tag: "highestpo2"
336
+ has_one :lowest_temperature, Float, tag: "lowesttemperature"
337
+ has_one :no_flight_time, Float, tag: "noflighttime"
338
+ has_one :notes, Base::Models::Notes
339
+ has_one :observations, Base::Models::Observations
340
+ has_one :pressure_drop, Float, tag: "pressuredrop"
341
+ has_many :problems, String, tag: "problems"
342
+ has_one :program, String
343
+ has_many :ratings, Base::Models::Rating, tag: "rating"
344
+ has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
345
+ has_one :thermal_comfort, String, tag: "thermalcomfort"
346
+ has_many :timers, Timer, tag: "timer"
347
+ has_one :visibility, Float
348
+ has_one :workload, String
349
+ end
350
+
351
+ class Samples
352
+ include HappyMapper
353
+
354
+ tag "samples"
355
+
356
+ has_many :waypoints, Waypoint, tag: "waypoint"
357
+ end
358
+
359
+ class TankData
360
+ include HappyMapper
361
+
362
+ tag "tankdata"
363
+
364
+ attribute :id, String
365
+
366
+ has_one :analysed_he, Float, tag: "analysedhe"
367
+ has_one :analysed_o2, Float, tag: "analysedo2"
368
+ has_one :breathing_consumption_volume, Float, tag: "breathingconsumptionvolume"
369
+ has_many :links, Base::Models::Link, tag: "link"
370
+ has_one :tank_pressure_begin, Float, tag: "tankpressurebegin"
371
+ has_one :tank_pressure_end, Float, tag: "tankpressureend"
372
+ has_one :tank_volume, Float, tag: "tankvolume"
373
+ end
374
+
375
+ class Dive
376
+ include HappyMapper
377
+
378
+ tag "dive"
379
+
380
+ attribute :id, String
381
+ has_one :information_after_dive, InformationAfterDive, tag: "informationafterdive"
382
+ has_one :information_before_dive, InformationBeforeDive, tag: "informationbeforedive"
383
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
384
+ has_one :samples, Samples
385
+ has_many :tank_data, TankData, tag: "tankdata"
386
+ end
387
+
388
+ class RepetitionGroup
389
+ include HappyMapper
390
+
391
+ tag "repetitiongroup"
392
+
393
+ attribute :id, String
394
+ has_many :dives, Dive, tag: "dive"
395
+ end
396
+
397
+ class ProfileData
398
+ include HappyMapper
399
+
400
+ tag "profiledata"
401
+
402
+ has_many :repetition_groups, RepetitionGroup, tag: "repetitiongroup"
403
+ end
404
+
405
+ class Descent
406
+ include HappyMapper
407
+
408
+ tag "descent"
409
+
410
+ has_many :waypoints, Waypoint, tag: "waypoint"
411
+ end
412
+
413
+ class Ascent
414
+ include HappyMapper
415
+
416
+ tag "ascent"
417
+
418
+ has_many :waypoints, Waypoint, tag: "waypoint"
419
+ end
420
+
421
+ class MixChange
422
+ include HappyMapper
423
+
424
+ tag "mixchange"
425
+
426
+ has_one :ascent, Ascent
427
+ has_one :descent, Descent
428
+ end
429
+
430
+ class InputProfile
431
+ include HappyMapper
432
+
433
+ tag "inputprofile"
434
+
435
+ has_many :links, Base::Models::Link, tag: "link"
436
+ has_many :waypoints, Waypoint, tag: "waypoint"
437
+ end
438
+
439
+ class Output
440
+ include HappyMapper
441
+
442
+ tag "output"
443
+
444
+ has_one :lingo, String
445
+ has_one :file_format, String, tag: "fileformat"
446
+ has_one :file_name, String, tag: "filename"
447
+ has_one :headline, String
448
+ has_one :remark, String
449
+ end
450
+
451
+ class Profile
452
+ include HappyMapper
453
+
454
+ tag "profile"
455
+
456
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
457
+ has_one :deco_model, Base::Models::DecoModelV320, tag: "decomodel"
458
+ has_one :deep_stops, DeepStops, tag: "deepstops"
459
+ has_one :density, Float
460
+ has_one :input_profile, InputProfile, tag: "inputprofile"
461
+ has_many :links, Base::Models::Link, tag: "link"
462
+ has_one :maximum_ascending_rate, Float, tag: "maximumascendingrate"
463
+ has_one :mix_change, MixChange, tag: "mixchange"
464
+ has_one :output, Output
465
+ has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
466
+ has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
467
+ has_one :title, String
468
+ end
469
+
470
+ class TableScope
471
+ include HappyMapper
472
+
473
+ tag "tablescope"
474
+
475
+ has_one :altitude, Float
476
+ has_one :bottom_time_maximum, Float, tag: "bottomtimemaximum"
477
+ has_one :bottom_time_minimum, Float, tag: "bottomtimeminimum"
478
+ has_one :bottom_time_step_begin, Float, tag: "bottomtimestepbegin"
479
+ has_one :bottom_time_step_end, Float, tag: "bottomtimestepend"
480
+ has_one :dive_depth_begin, Float, tag: "divedepthbegin"
481
+ has_one :dive_depth_end, Float, tag: "divedepthend"
482
+ has_one :dive_depth_step, Float, tag: "divedepthstep"
483
+ end
484
+
485
+ class Table
486
+ include HappyMapper
487
+
488
+ tag "table"
489
+
490
+ has_one :table_scope, TableScope, tag: "tablescope"
491
+ has_one :deep_stops, DeepStops, tag: "deepstops"
492
+ end
493
+
494
+ class CalculateProfile
495
+ include HappyMapper
496
+
497
+ tag "calculateprofile"
498
+
499
+ has_many :profiles, Profile, tag: "profile"
500
+ end
501
+
502
+ class CalculateTable
503
+ include HappyMapper
504
+
505
+ tag "calculatetable"
506
+
507
+ has_many :tables, Table, tag: "table"
508
+ end
509
+
510
+ class BottomTimeTableScope
511
+ include HappyMapper
512
+
513
+ tag "bottomtimetablescope"
514
+
515
+ has_one :breathing_consumption_volume_begin, Float, tag: "breathingconsumptionvolumebegin"
516
+ has_one :breathing_consumption_volume_end, Float, tag: "breathingconsumptionvolumeend"
517
+ has_one :breathing_consumption_volume_step, Float, tag: "breathingconsumptionvolumestep"
518
+ has_one :dive_depth_begin, Float, tag: "divedepthbegin"
519
+ has_one :dive_depth_end, Float, tag: "divedepthend"
520
+ has_one :dive_depth_step, Float, tag: "divedepthstep"
521
+ has_one :tank_pressure_begin, Float, tag: "tankpressurebegin"
522
+ has_one :tank_pressure_reserve, Float, tag: "tankpressurereserve"
523
+ has_one :tank_volume_begin, Float, tag: "tankvolumebegin"
524
+ has_one :tank_volume_end, Float, tag: "tankvolumeend"
525
+ end
526
+
527
+ class BottomTimeTable
528
+ include HappyMapper
529
+
530
+ tag "bottomtimetable"
531
+
532
+ attribute :id, String
533
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
534
+ has_one :bottom_time_table_scope, BottomTimeTableScope, tag: "bottomtimetablescope"
535
+ has_many :links, Base::Models::Link, tag: "link"
536
+ has_one :output, Output
537
+ has_one :title, String
538
+ end
539
+
540
+ class CalculateBottomTimeTable
541
+ include HappyMapper
542
+
543
+ tag "calculatebottomtimetable"
544
+
545
+ has_many :bottom_time_tables, BottomTimeTable, tag: "bottomtimetable"
546
+ end
547
+
548
+ class TableGeneration
549
+ include HappyMapper
550
+
551
+ tag "tablegeneration"
552
+
553
+ has_one :calculate_bottom_time_table, CalculateBottomTimeTable, tag: "calculatebottomtimetable"
554
+ has_one :calculate_profile, CalculateProfile, tag: "calculateprofile"
555
+ has_one :calculate_table, CalculateTable, tag: "calculatetable"
556
+ end
557
+
558
+ class Maker
559
+ include HappyMapper
560
+
561
+ tag "maker"
562
+
563
+ has_many :manufacturers, Base::Models::Manufacturer, tag: "manufacturer"
564
+ end
565
+
566
+ class Business
567
+ include HappyMapper
568
+
569
+ tag "business"
570
+
571
+ has_one :shop, Base::Models::Shop
572
+ end
573
+
574
+ class TemperatureSensor
575
+ include HappyMapper
576
+
577
+ tag "temperaturesensor"
578
+
579
+ attribute :id, String
580
+
581
+ has_many :alias_names, String, tag: "aliasname"
582
+ has_one :manufacturer, Base::Models::Manufacturer
583
+ has_one :model, String
584
+ has_one :name, String
585
+ has_one :next_service_date, Base::Models::DateTimeField, tag: "nextservicedate"
586
+ has_one :notes, Base::Models::Notes
587
+ has_one :purchase, Base::Models::Purchase
588
+ has_one :serial_number, String, tag: "serialnumber"
589
+ has_one :service_interval, Integer, tag: "serviceinterval"
590
+ end
591
+
592
+ class TimerDevice
593
+ include HappyMapper
594
+
595
+ tag "timerdevice"
596
+
597
+ attribute :id, String
598
+ end
599
+
600
+ class EquipmentPart
601
+ include HappyMapper
602
+
603
+ tag "equipmentpart"
604
+
605
+ attribute :id, String
606
+ has_many :alias_names, String, tag: "aliasname"
607
+ has_many :links, Base::Models::Link, tag: "link"
608
+ has_one :manufacturer, Base::Models::Manufacturer
609
+ has_one :model, String
610
+ has_one :name, String
611
+ has_one :next_service_date, Base::Models::DateTimeField, tag: "nextservicedate"
612
+ has_one :notes, Base::Models::Notes
613
+ has_one :purchase, Base::Models::Purchase
614
+ has_one :serial_number, String, tag: "serialnumber"
615
+ has_one :service_interval, Integer, tag: "serviceinterval"
616
+ end
617
+
618
+ class Lead < EquipmentPart
619
+ include HappyMapper
620
+
621
+ tag "lead"
622
+
623
+ has_one :lead_quantity, Integer, tag: "leadquantity"
624
+ end
625
+
626
+ class Rebreather < EquipmentPart
627
+ include HappyMapper
628
+
629
+ tag "rebreather"
630
+
631
+ has_many :batteries, Battery, tag: "battery"
632
+ has_many :o2_sensors, EquipmentPart, tag: "o2sensor"
633
+ has_many :scrubber_monitors, ScrubberMonitor, tag: "scrubbermonitor"
634
+ has_many :temperature_sensors, TemperatureSensor, tag: "temperaturesensor"
635
+ has_many :timer_devices, TimerDevice, tag: "timerdevice"
636
+ end
637
+
638
+ class Suit < EquipmentPart
639
+ include HappyMapper
640
+
641
+ tag "suit"
642
+
643
+ has_one :suit_type, String, tag: "suittype"
644
+ end
645
+
646
+ class Tank < EquipmentPart
647
+ include HappyMapper
648
+
649
+ tag "tank"
650
+
651
+ has_one :tank_material, String, tag: "tankmaterial"
652
+ has_one :tank_volume, Float, tag: "tankvolume"
653
+ has_many :batteries, Battery, tag: "battery"
654
+ end
655
+
656
+ class Camera
657
+ include HappyMapper
658
+
659
+ tag "camera"
660
+
661
+ has_one :body, EquipmentPart
662
+ has_many :flashes, EquipmentPart, tag: "flash"
663
+ has_one :housing, EquipmentPart
664
+ has_one :lens, EquipmentPart
665
+ end
666
+
667
+ class DiveComputer < EquipmentPart
668
+ include HappyMapper
669
+
670
+ tag "divecomputer"
671
+
672
+ has_many :batteries, Battery, tag: "battery"
673
+ has_many :timer_devices, TimerDevice, tag: "timerdevice"
674
+ end
675
+
676
+ class EquipmentContent
677
+ include HappyMapper
678
+
679
+ has_many :boots, EquipmentPart, tag: "boots"
680
+ has_many :buoyancy_control_devices, EquipmentPart, tag: "buoyancycontroldevice"
681
+ has_many :cameras, Camera, tag: "camera"
682
+ has_many :compasses, EquipmentPart, tag: "compass"
683
+ has_many :dive_computers, DiveComputer, tag: "divecomputer"
684
+ has_many :fins, EquipmentPart, tag: "fins"
685
+ has_many :gloves, EquipmentPart, tag: "gloves"
686
+ has_many :knives, EquipmentPart, tag: "knife"
687
+ has_many :leads, Lead, tag: "lead"
688
+ has_many :lights, EquipmentPart, tag: "light"
689
+ has_many :masks, EquipmentPart, tag: "mask"
690
+ has_many :rebreathers, Rebreather, tag: "rebreather"
691
+ has_many :regulators, EquipmentPart, tag: "regulator"
692
+ has_many :scooters, EquipmentPart, tag: "scooter"
693
+ has_many :suits, Suit, tag: "suit"
694
+ has_many :tanks, Tank, tag: "tank"
695
+ has_many :various_pieces, EquipmentPart, tag: "variouspieces"
696
+ has_many :video_cameras, EquipmentPart, tag: "videocamera"
697
+ has_many :watches, EquipmentPart, tag: "watch"
698
+ end
699
+
700
+ class EquipmentConfiguration < EquipmentContent
701
+ include HappyMapper
702
+
703
+ tag "equipmentconfiguration"
704
+
705
+ has_many :alias_names, String, tag: "aliasname"
706
+ has_many :links, Base::Models::Link, tag: "link"
707
+ has_one :name, String
708
+ has_one :notes, Base::Models::Notes
709
+ end
710
+
711
+ class Equipment < EquipmentContent
712
+ include HappyMapper
713
+
714
+ tag "equipment"
715
+
716
+ has_many :compressors, EquipmentPart, tag: "compressor"
717
+ has_one :equipment_configuration, EquipmentConfiguration, tag: "equipmentconfiguration"
718
+ end
719
+
720
+ class BuddyOwnerShared
721
+ include HappyMapper
722
+
723
+ attribute :id, String
724
+ has_one :address, Base::Models::Address
725
+ has_one :contact, Base::Models::Contact
726
+ has_one :dive_insurances, Base::Models::DiveInsurances, tag: "diveinsurances"
727
+ has_one :dive_permissions, Base::Models::DivePermissions, tag: "divepermissions"
728
+ has_one :equipment, Equipment
729
+ has_one :medical, Base::Models::Medical
730
+ has_one :notes, Base::Models::Notes
731
+ has_one :personal, Base::Models::Personal
732
+ end
733
+
734
+ class Buddy < BuddyOwnerShared
735
+ include HappyMapper
736
+
737
+ tag "buddy"
738
+
739
+ attribute :id, String
740
+ has_one :certification, Base::Models::CertificationV322
741
+ has_one :student, String
742
+ end
743
+
744
+ class Owner < BuddyOwnerShared
745
+ include HappyMapper
746
+
747
+ tag "owner"
748
+
749
+ attribute :id, String
750
+ has_one :education, Base::Models::EducationV322
751
+ end
752
+
753
+ class Diver
754
+ include HappyMapper
755
+
756
+ tag "diver"
757
+
758
+ has_many :buddies, Buddy, tag: "buddy"
759
+ has_one :owner, Owner
760
+ end
761
+
762
+ class Uddf
763
+ include HappyMapper
764
+
765
+ tag "uddf"
766
+
767
+ attribute :version, String
768
+ has_one :business, Business
769
+ has_one :deco_model, Base::Models::DecoModelV320, tag: "decomodel"
770
+ has_one :dive_computer_control, Base::Models::DiveComputerControlV330, tag: "divecomputercontrol"
771
+ has_one :diver, Diver
772
+ has_one :dive_site, Base::Models::DiveSite, tag: "divesite"
773
+ has_one :dive_trip, Base::Models::DiveTrip, tag: "divetrip"
774
+ has_one :gas_definitions, Base::Models::GasDefinitions, tag: "gasdefinitions"
775
+ has_one :generator, Base::Models::Generator
776
+ has_one :maker, Maker
777
+ has_one :media_data, Base::Models::MediaData, tag: "mediadata"
778
+ has_one :profile_data, ProfileData, tag: "profiledata"
779
+ has_one :table_generation, TableGeneration, tag: "tablegeneration"
780
+ end
781
+ end
782
+ end
783
+ end