Skip to content

Commit 50b4040

Browse files
committed
Add properties to schema ORM for API compatibility
1 parent a582267 commit 50b4040

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

threedi_schema/domain/models.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ class SimpleInfiltration(Base):
156156
max_infiltration_volume = Column(Float)
157157
max_infiltration_volume_file = Column(Text)
158158

159+
# Alias needed for API compatibility
160+
@property
161+
def max_infiltration_volume_file(self):
162+
return self.max_infiltration_volume_file
163+
159164

160165
class SurfaceParameter(Base):
161166
__tablename__ = "v2_surface_parameters"
@@ -233,6 +238,11 @@ class GroundWater(Base):
233238
leakage = Column(Float)
234239
leakage_file = Column(String(255))
235240

241+
# Alias needed for API compatibility
242+
@property
243+
def groundwater_hydro_connectivity_file(self):
244+
return self.groundwater_hydraulic_conductivity_file
245+
236246

237247
class GridRefinement(Base):
238248
__tablename__ = "v2_grid_refinement"
@@ -402,6 +412,11 @@ class ModelSettings(Base):
402412
use_groundwater_storage = Column(Boolean)
403413
use_vegetation_drag_2d = Column(Boolean)
404414

415+
# Alias needed for API compatibility
416+
@property
417+
def frict_coef_file(self):
418+
return self.friction_coefficient_file
419+
405420

406421
class InitialConditions(Base):
407422
__tablename__ = "initial_conditions"
@@ -415,6 +430,11 @@ class InitialConditions(Base):
415430
initial_water_level_aggregation = Column(IntegerEnum(constants.InitializationType))
416431
initial_water_level_file = Column(String(255))
417432

433+
# Alias needed for API compatibility
434+
@property
435+
def initial_waterlevel_file(self):
436+
return self.initial_water_level_file
437+
418438

419439
class Interception(Base):
420440
__tablename__ = "interception"

0 commit comments

Comments
 (0)