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,796 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "happymapper"
4
+ require "uddf/base/models"
5
+
6
+ module UDDF
7
+ module V331
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 TankUsed
360
+ include HappyMapper
361
+
362
+ tag "tankused"
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 TankData
376
+ include HappyMapper
377
+
378
+ tag "tankdata"
379
+
380
+ has_many :tanks_used, TankUsed, tag: "tankused"
381
+ end
382
+
383
+ class Dive
384
+ include HappyMapper
385
+
386
+ tag "dive"
387
+
388
+ attribute :id, String
389
+ has_one :information_after_dive, InformationAfterDive, tag: "informationafterdive"
390
+ has_one :information_before_dive, InformationBeforeDive, tag: "informationbeforedive"
391
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
392
+ has_one :samples, Samples
393
+ has_one :tank_data, TankData, tag: "tankdata"
394
+ end
395
+
396
+ class RepetitionGroup
397
+ include HappyMapper
398
+
399
+ tag "repetitiongroup"
400
+
401
+ attribute :id, String
402
+ has_many :dives, Dive, tag: "dive"
403
+ end
404
+
405
+ class ProfileData
406
+ include HappyMapper
407
+
408
+ tag "profiledata"
409
+
410
+ has_many :repetition_groups, RepetitionGroup, tag: "repetitiongroup"
411
+ end
412
+
413
+ class Descent
414
+ include HappyMapper
415
+
416
+ tag "descent"
417
+
418
+ has_many :waypoints, Waypoint, tag: "waypoint"
419
+ end
420
+
421
+ class Ascent
422
+ include HappyMapper
423
+
424
+ tag "ascent"
425
+
426
+ has_many :waypoints, Waypoint, tag: "waypoint"
427
+ end
428
+
429
+ class MixChange
430
+ include HappyMapper
431
+
432
+ tag "mixchange"
433
+
434
+ has_one :ascent, Ascent
435
+ has_one :descent, Descent
436
+ end
437
+
438
+ class InputProfile
439
+ include HappyMapper
440
+
441
+ tag "inputprofile"
442
+
443
+ has_many :links, Base::Models::Link, tag: "link"
444
+ has_many :waypoints, Waypoint, tag: "waypoint"
445
+ end
446
+
447
+ class Output
448
+ include HappyMapper
449
+
450
+ tag "output"
451
+
452
+ has_one :lingo, String
453
+ has_one :file_format, String, tag: "fileformat"
454
+ has_one :file_name, String, tag: "filename"
455
+ has_one :headline, String
456
+ has_one :remark, String
457
+ end
458
+
459
+ class Profile
460
+ include HappyMapper
461
+
462
+ tag "profile"
463
+
464
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
465
+ has_one :deco_model, Base::Models::DecoModelV320, tag: "decomodel"
466
+ has_one :deep_stops, DeepStops, tag: "deepstops"
467
+ has_one :density, Float
468
+ has_one :input_profile, InputProfile, tag: "inputprofile"
469
+ has_many :links, Base::Models::Link, tag: "link"
470
+ has_one :maximum_ascending_rate, Float, tag: "maximumascendingrate"
471
+ has_one :mix_change, MixChange, tag: "mixchange"
472
+ has_one :output, Output
473
+ has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
474
+ has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
475
+ has_one :title, String
476
+ end
477
+
478
+ class TableScope
479
+ include HappyMapper
480
+
481
+ tag "tablescope"
482
+
483
+ has_one :altitude, Float
484
+ has_one :bottom_time_maximum, Float, tag: "bottomtimemaximum"
485
+ has_one :bottom_time_minimum, Float, tag: "bottomtimeminimum"
486
+ has_one :bottom_time_step_begin, Float, tag: "bottomtimestepbegin"
487
+ has_one :bottom_time_step_end, Float, tag: "bottomtimestepend"
488
+ has_one :dive_depth_begin, Float, tag: "divedepthbegin"
489
+ has_one :dive_depth_end, Float, tag: "divedepthend"
490
+ has_one :dive_depth_step, Float, tag: "divedepthstep"
491
+ end
492
+
493
+ class Table
494
+ include HappyMapper
495
+
496
+ tag "table"
497
+
498
+ has_one :table_scope, TableScope, tag: "tablescope"
499
+ has_one :deep_stops, DeepStops, tag: "deepstops"
500
+ end
501
+
502
+ class CalculateProfile
503
+ include HappyMapper
504
+
505
+ tag "calculateprofile"
506
+
507
+ has_many :profiles, Profile, tag: "profile"
508
+ end
509
+
510
+ class CalculateTable
511
+ include HappyMapper
512
+
513
+ tag "calculatetable"
514
+
515
+ has_many :tables, Table, tag: "table"
516
+ end
517
+
518
+ class BottomTimeTableScope
519
+ include HappyMapper
520
+
521
+ tag "bottomtimetablescope"
522
+
523
+ has_one :breathing_consumption_volume_begin, Float, tag: "breathingconsumptionvolumebegin"
524
+ has_one :breathing_consumption_volume_end, Float, tag: "breathingconsumptionvolumeend"
525
+ has_one :breathing_consumption_volume_step, Float, tag: "breathingconsumptionvolumestep"
526
+ has_one :dive_depth_begin, Float, tag: "divedepthbegin"
527
+ has_one :dive_depth_end, Float, tag: "divedepthend"
528
+ has_one :dive_depth_step, Float, tag: "divedepthstep"
529
+ has_one :tank_pressure_begin, Float, tag: "tankpressurebegin"
530
+ has_one :tank_pressure_reserve, Float, tag: "tankpressurereserve"
531
+ has_one :tank_volume_begin, Float, tag: "tankvolumebegin"
532
+ has_one :tank_volume_end, Float, tag: "tankvolumeend"
533
+ end
534
+
535
+ class BottomTimeTable
536
+ include HappyMapper
537
+
538
+ tag "bottomtimetable"
539
+
540
+ attribute :id, String
541
+ has_one :application_data, Base::Models::ApplicationDataV330, tag: "applicationdata"
542
+ has_one :bottom_time_table_scope, BottomTimeTableScope, tag: "bottomtimetablescope"
543
+ has_many :links, Base::Models::Link, tag: "link"
544
+ has_one :output, Output
545
+ has_one :title, String
546
+ end
547
+
548
+ class CalculateBottomTimeTable
549
+ include HappyMapper
550
+
551
+ tag "calculatebottomtimetable"
552
+
553
+ has_many :bottom_time_tables, BottomTimeTable, tag: "bottomtimetable"
554
+ end
555
+
556
+ class TableGeneration
557
+ include HappyMapper
558
+
559
+ tag "tablegeneration"
560
+
561
+ has_one :calculate_bottom_time_table, CalculateBottomTimeTable, tag: "calculatebottomtimetable"
562
+ has_one :calculate_profile, CalculateProfile, tag: "calculateprofile"
563
+ has_one :calculate_table, CalculateTable, tag: "calculatetable"
564
+ end
565
+
566
+ class Maker
567
+ include HappyMapper
568
+
569
+ tag "maker"
570
+
571
+ has_many :manufacturers, Base::Models::Manufacturer, tag: "manufacturer"
572
+ end
573
+
574
+ class Business
575
+ include HappyMapper
576
+
577
+ tag "business"
578
+
579
+ has_one :shop, Base::Models::Shop
580
+ end
581
+
582
+ class TemperatureSensor
583
+ include HappyMapper
584
+
585
+ tag "temperaturesensor"
586
+
587
+ attribute :id, String
588
+
589
+ has_many :alias_names, String, tag: "aliasname"
590
+ has_one :manufacturer, Base::Models::Manufacturer
591
+ has_one :model, String
592
+ has_one :name, String
593
+ has_one :next_service_date, Base::Models::DateTimeField, tag: "nextservicedate"
594
+ has_one :notes, Base::Models::Notes
595
+ has_one :purchase, Base::Models::Purchase
596
+ has_one :serial_number, String, tag: "serialnumber"
597
+ has_one :service_interval, Integer, tag: "serviceinterval"
598
+ end
599
+
600
+ class TimerDevice
601
+ include HappyMapper
602
+
603
+ tag "timerdevice"
604
+
605
+ attribute :id, String
606
+ end
607
+
608
+ class EquipmentPart
609
+ include HappyMapper
610
+
611
+ tag "equipmentpart"
612
+
613
+ attribute :id, String
614
+ has_many :alias_names, String, tag: "aliasname"
615
+ has_many :links, Base::Models::Link, tag: "link"
616
+ has_one :manufacturer, Base::Models::Manufacturer
617
+ has_one :model, String
618
+ has_one :name, String
619
+ has_one :next_service_date, Base::Models::DateTimeField, tag: "nextservicedate"
620
+ has_one :notes, Base::Models::Notes
621
+ has_one :purchase, Base::Models::Purchase
622
+ has_one :serial_number, String, tag: "serialnumber"
623
+ has_one :service_interval, Integer, tag: "serviceinterval"
624
+ end
625
+
626
+ class Lead < EquipmentPart
627
+ include HappyMapper
628
+
629
+ tag "lead"
630
+
631
+ has_one :lead_quantity, Integer, tag: "leadquantity"
632
+ end
633
+
634
+ class Rebreather < EquipmentPart
635
+ include HappyMapper
636
+
637
+ tag "rebreather"
638
+
639
+ has_many :batteries, Battery, tag: "battery"
640
+ has_many :o2_sensors, EquipmentPart, tag: "o2sensor"
641
+ has_many :scrubber_monitors, ScrubberMonitor, tag: "scrubbermonitor"
642
+ has_many :temperature_sensors, TemperatureSensor, tag: "temperaturesensor"
643
+ has_many :timer_devices, TimerDevice, tag: "timerdevice"
644
+ end
645
+
646
+ class Suit < EquipmentPart
647
+ include HappyMapper
648
+
649
+ tag "suit"
650
+
651
+ has_one :suit_type, String, tag: "suittype"
652
+ end
653
+
654
+ class Tank < EquipmentPart
655
+ include HappyMapper
656
+
657
+ tag "tank"
658
+
659
+ has_one :tank_material, String, tag: "tankmaterial"
660
+ has_one :tank_volume, Float, tag: "tankvolume"
661
+ has_many :batteries, Battery, tag: "battery"
662
+ has_one :hydro_service_interval, Integer, tag: "hydroserviceinterval"
663
+ has_one :next_hydro_date, Base::Models::DateTimeField, tag: "nexthydrodate"
664
+ has_one :next_visual_date, Base::Models::DateTimeField, tag: "nextvisualdate"
665
+ has_one :rated_pressure, Float, tag: "ratedpressure"
666
+ has_one :visual_service_interval, Integer, tag: "visualserviceinterval"
667
+ end
668
+
669
+ class Camera
670
+ include HappyMapper
671
+
672
+ tag "camera"
673
+
674
+ has_one :body, EquipmentPart
675
+ has_many :flashes, EquipmentPart, tag: "flash"
676
+ has_one :housing, EquipmentPart
677
+ has_one :lens, EquipmentPart
678
+ end
679
+
680
+ class DiveComputer < EquipmentPart
681
+ include HappyMapper
682
+
683
+ tag "divecomputer"
684
+
685
+ has_many :batteries, Battery, tag: "battery"
686
+ has_many :timer_devices, TimerDevice, tag: "timerdevice"
687
+ end
688
+
689
+ class EquipmentContent
690
+ include HappyMapper
691
+
692
+ has_many :boots, EquipmentPart, tag: "boots"
693
+ has_many :buoyancy_control_devices, EquipmentPart, tag: "buoyancycontroldevice"
694
+ has_many :cameras, Camera, tag: "camera"
695
+ has_many :compasses, EquipmentPart, tag: "compass"
696
+ has_many :dive_computers, DiveComputer, tag: "divecomputer"
697
+ has_many :fins, EquipmentPart, tag: "fins"
698
+ has_many :gloves, EquipmentPart, tag: "gloves"
699
+ has_many :knives, EquipmentPart, tag: "knife"
700
+ has_many :leads, Lead, tag: "lead"
701
+ has_many :lights, EquipmentPart, tag: "light"
702
+ has_many :masks, EquipmentPart, tag: "mask"
703
+ has_many :rebreathers, Rebreather, tag: "rebreather"
704
+ has_many :regulators, EquipmentPart, tag: "regulator"
705
+ has_many :scooters, EquipmentPart, tag: "scooter"
706
+ has_many :suits, Suit, tag: "suit"
707
+ has_many :tanks, Tank, tag: "tank"
708
+ has_many :various_pieces, EquipmentPart, tag: "variouspieces"
709
+ has_many :video_cameras, EquipmentPart, tag: "videocamera"
710
+ has_many :watches, EquipmentPart, tag: "watch"
711
+ end
712
+
713
+ class EquipmentConfiguration < EquipmentContent
714
+ include HappyMapper
715
+
716
+ tag "equipmentconfiguration"
717
+
718
+ has_many :alias_names, String, tag: "aliasname"
719
+ has_many :links, Base::Models::Link, tag: "link"
720
+ has_one :name, String
721
+ has_one :notes, Base::Models::Notes
722
+ end
723
+
724
+ class Equipment < EquipmentContent
725
+ include HappyMapper
726
+
727
+ tag "equipment"
728
+
729
+ has_many :compressors, EquipmentPart, tag: "compressor"
730
+ has_one :equipment_configuration, EquipmentConfiguration, tag: "equipmentconfiguration"
731
+ end
732
+
733
+ class BuddyOwnerShared
734
+ include HappyMapper
735
+
736
+ attribute :id, String
737
+ has_one :address, Base::Models::Address
738
+ has_one :contact, Base::Models::Contact
739
+ has_one :dive_insurances, Base::Models::DiveInsurances, tag: "diveinsurances"
740
+ has_one :dive_permissions, Base::Models::DivePermissions, tag: "divepermissions"
741
+ has_one :equipment, Equipment
742
+ has_one :medical, Base::Models::Medical
743
+ has_one :notes, Base::Models::Notes
744
+ has_one :personal, Base::Models::Personal
745
+ end
746
+
747
+ class Buddy < BuddyOwnerShared
748
+ include HappyMapper
749
+
750
+ tag "buddy"
751
+
752
+ attribute :id, String
753
+ has_one :certification, Base::Models::CertificationV322
754
+ has_one :student, String
755
+ end
756
+
757
+ class Owner < BuddyOwnerShared
758
+ include HappyMapper
759
+
760
+ tag "owner"
761
+
762
+ attribute :id, String
763
+ has_one :education, Base::Models::EducationV322
764
+ end
765
+
766
+ class Diver
767
+ include HappyMapper
768
+
769
+ tag "diver"
770
+
771
+ has_many :buddies, Buddy, tag: "buddy"
772
+ has_one :owner, Owner
773
+ end
774
+
775
+ class Uddf
776
+ include HappyMapper
777
+
778
+ tag "uddf"
779
+
780
+ attribute :version, String
781
+ has_one :business, Business
782
+ has_one :deco_model, Base::Models::DecoModelV320, tag: "decomodel"
783
+ has_one :dive_computer_control, Base::Models::DiveComputerControlV330, tag: "divecomputercontrol"
784
+ has_one :diver, Diver
785
+ has_one :dive_site, Base::Models::DiveSite, tag: "divesite"
786
+ has_one :dive_trip, Base::Models::DiveTrip, tag: "divetrip"
787
+ has_one :gas_definitions, Base::Models::GasDefinitions, tag: "gasdefinitions"
788
+ has_one :generator, Base::Models::Generator
789
+ has_one :maker, Maker
790
+ has_one :media_data, Base::Models::MediaData, tag: "mediadata"
791
+ has_one :profile_data, ProfileData, tag: "profiledata"
792
+ has_one :table_generation, TableGeneration, tag: "tablegeneration"
793
+ end
794
+ end
795
+ end
796
+ end