Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions lib/uddf/base/models/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,57 @@ class DivePermissions

has_many :permits, Permit, tag: "permit"
end

class GlobalAlarmsGiven
include HappyMapper

tag "globalalarmsgiven"

has_many :global_alarms, String, tag: "globalalarm"
end

class WayAltitude
include HappyMapper

tag "wayaltitude"

attribute :way_time, Float, tag: "waytime"
content :value, Float
end

class ExposureToAltitude
include HappyMapper

tag "exposuretoaltitude"

has_one :altitude_of_exposure, Float, tag: "altitudeofexposure"
has_one :date_of_flight, Base::Models::DateTimeField, tag: "dateofflight"
has_one :surface_interval_before_altitude_exposure, Float, tag: "surfaceintervalbeforealtitudeexposure"
has_one :total_length_of_exposure, Float, tag: "totallengthofexposure"
has_one :transportation, String
end

class SurfaceIntervalBeforeDive
include HappyMapper

tag "surfaceintervalbeforedive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class SurfaceIntervalAfterDive
include HappyMapper

tag "surfaceintervalafterdive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end
end
end
end
61 changes: 5 additions & 56 deletions lib/uddf/v300/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,6 @@
module UDDF
module V300
module Models
class WayAltitude
include HappyMapper

tag "wayaltitude"

attribute :way_time, Float, tag: "waytime"
content :value, Float
end

class ExposureToAltitude
include HappyMapper

tag "exposuretoaltitude"

has_one :altitude_of_exposure, Float, tag: "altitudeofexposure"
has_one :date_of_flight, Base::Models::DateTimeField, tag: "dateofflight"
has_one :surface_interval_before_altitude_exposure, Float, tag: "surfaceintervalbeforealtitudeexposure"
has_one :total_length_of_exposure, Float, tag: "totallengthofexposure"
has_one :transportation, String
end

class SurfaceIntervalBeforeDive
include HappyMapper

tag "surfaceintervalbeforedive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class SurfaceIntervalAfterDive
include HappyMapper

tag "surfaceintervalafterdive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class TankPressure
include HappyMapper

Expand Down Expand Up @@ -144,18 +101,10 @@ class InformationBeforeDive
has_one :price, Base::Models::Price
has_one :purpose, String
has_one :state_of_rest_before_dive, String, tag: "stateofrestbeforedive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :trip_membership, String, tag: "tripmembership"
end

class GlobalAlarmsGiven
include HappyMapper

tag "globalalarmsgiven"

has_many :global_alarms, String, tag: "globalalarm"
end

class EquipmentUsed
include HappyMapper

Expand All @@ -178,7 +127,7 @@ class InformationAfterDive
has_one :dive_table, String, tag: "divetable"
has_one :equipment_malfunction, String, tag: "equipmentmalfunction"
has_one :equipment_used, EquipmentUsed, tag: "equipmentused"
has_one :global_alarms_given, GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :global_alarms_given, Base::Models::GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :greatest_depth, Float, tag: "greatestdepth"
has_one :highest_po2, Float, tag: "highestpo2"
has_one :lowest_temperature, Float, tag: "lowesttemperature"
Expand All @@ -188,7 +137,7 @@ class InformationAfterDive
has_many :problems, String, tag: "problems"
has_one :program, String
has_many :ratings, Base::Models::Rating, tag: "rating"
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :thermal_comfort, String, tag: "thermalcomfort"
has_one :visibility, Float
has_one :workload, String
Expand Down Expand Up @@ -305,8 +254,8 @@ class Profile
has_one :maximum_ascending_rate, Float, tag: "maximumascendingrate"
has_one :mix_change, MixChange, tag: "mixchange"
has_one :output, Output
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :title, String
end

Expand Down
61 changes: 5 additions & 56 deletions lib/uddf/v301/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,6 @@
module UDDF
module V301
module Models
class WayAltitude
include HappyMapper

tag "wayaltitude"

attribute :way_time, Float, tag: "waytime"
content :value, Float
end

class ExposureToAltitude
include HappyMapper

tag "exposuretoaltitude"

has_one :altitude_of_exposure, Float, tag: "altitudeofexposure"
has_one :date_of_flight, Base::Models::DateTimeField, tag: "dateofflight"
has_one :surface_interval_before_altitude_exposure, Float, tag: "surfaceintervalbeforealtitudeexposure"
has_one :total_length_of_exposure, Float, tag: "totallengthofexposure"
has_one :transportation, String
end

class SurfaceIntervalBeforeDive
include HappyMapper

tag "surfaceintervalbeforedive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class SurfaceIntervalAfterDive
include HappyMapper

tag "surfaceintervalafterdive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class TankPressure
include HappyMapper

Expand Down Expand Up @@ -144,18 +101,10 @@ class InformationBeforeDive
has_one :price, Base::Models::Price
has_one :purpose, String
has_one :state_of_rest_before_dive, String, tag: "stateofrestbeforedive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :trip_membership, String, tag: "tripmembership"
end

class GlobalAlarmsGiven
include HappyMapper

tag "globalalarmsgiven"

has_many :global_alarms, String, tag: "globalalarm"
end

class EquipmentUsed
include HappyMapper

Expand All @@ -178,7 +127,7 @@ class InformationAfterDive
has_one :dive_table, String, tag: "divetable"
has_one :equipment_malfunction, String, tag: "equipmentmalfunction"
has_one :equipment_used, EquipmentUsed, tag: "equipmentused"
has_one :global_alarms_given, GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :global_alarms_given, Base::Models::GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :greatest_depth, Float, tag: "greatestdepth"
has_one :highest_po2, Float, tag: "highestpo2"
has_one :lowest_temperature, Float, tag: "lowesttemperature"
Expand All @@ -189,7 +138,7 @@ class InformationAfterDive
has_many :problems, String, tag: "problems"
has_one :program, String
has_many :ratings, Base::Models::Rating, tag: "rating"
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :thermal_comfort, String, tag: "thermalcomfort"
has_one :visibility, Float
has_one :workload, String
Expand Down Expand Up @@ -306,8 +255,8 @@ class Profile
has_one :maximum_ascending_rate, Float, tag: "maximumascendingrate"
has_one :mix_change, MixChange, tag: "mixchange"
has_one :output, Output
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :title, String
end

Expand Down
61 changes: 5 additions & 56 deletions lib/uddf/v310/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,6 @@
module UDDF
module V310
module Models
class WayAltitude
include HappyMapper

tag "wayaltitude"

attribute :way_time, Float, tag: "waytime"
content :value, Float
end

class ExposureToAltitude
include HappyMapper

tag "exposuretoaltitude"

has_one :altitude_of_exposure, Float, tag: "altitudeofexposure"
has_one :date_of_flight, Base::Models::DateTimeField, tag: "dateofflight"
has_one :surface_interval_before_altitude_exposure, Float, tag: "surfaceintervalbeforealtitudeexposure"
has_one :total_length_of_exposure, Float, tag: "totallengthofexposure"
has_one :transportation, String
end

class SurfaceIntervalBeforeDive
include HappyMapper

tag "surfaceintervalbeforedive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class SurfaceIntervalAfterDive
include HappyMapper

tag "surfaceintervalafterdive"

has_one :exposure_to_altitude, ExposureToAltitude, tag: "exposuretoaltitude"
has_one :infinity, String
has_one :passed_time, Float, tag: "passedtime"
has_many :way_altitudes, WayAltitude, tag: "wayaltitude"
end

class TankPressure
include HappyMapper

Expand Down Expand Up @@ -186,19 +143,11 @@ class InformationBeforeDive
has_one :price, Base::Models::Price
has_one :purpose, String
has_one :state_of_rest_before_dive, String, tag: "stateofrestbeforedive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_pressure, Float, tag: "surfacepressure"
has_one :trip_membership, String, tag: "tripmembership"
end

class GlobalAlarmsGiven
include HappyMapper

tag "globalalarmsgiven"

has_many :global_alarms, String, tag: "globalalarm"
end

class EquipmentUsed
include HappyMapper

Expand All @@ -222,7 +171,7 @@ class InformationAfterDive
has_one :dive_table, String, tag: "divetable"
has_one :equipment_malfunction, String, tag: "equipmentmalfunction"
has_one :equipment_used, EquipmentUsed, tag: "equipmentused"
has_one :global_alarms_given, GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :global_alarms_given, Base::Models::GlobalAlarmsGiven, tag: "globalalarmsgiven"
has_one :greatest_depth, Float, tag: "greatestdepth"
has_one :highest_po2, Float, tag: "highestpo2"
has_one :lowest_temperature, Float, tag: "lowesttemperature"
Expand All @@ -233,7 +182,7 @@ class InformationAfterDive
has_many :problems, String, tag: "problems"
has_one :program, String
has_many :ratings, Base::Models::Rating, tag: "rating"
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :thermal_comfort, String, tag: "thermalcomfort"
has_one :visibility, Float
has_one :workload, String
Expand Down Expand Up @@ -350,8 +299,8 @@ class Profile
has_one :maximum_ascending_rate, Float, tag: "maximumascendingrate"
has_one :mix_change, MixChange, tag: "mixchange"
has_one :output, Output
has_one :surface_interval_after_dive, SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :surface_interval_after_dive, Base::Models::SurfaceIntervalAfterDive, tag: "surfaceintervalafterdive"
has_one :surface_interval_before_dive, Base::Models::SurfaceIntervalBeforeDive, tag: "surfaceintervalbeforedive"
has_one :title, String
end

Expand Down
Loading