Skip to content

Commit

Permalink
leave all SBA old stuff in tables
Browse files Browse the repository at this point in the history
  • Loading branch information
rmarow committed Oct 14, 2024
1 parent bb4fd66 commit dcdc2dd
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions usaon_benefit_tool/models/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,3 +473,47 @@ class SocietalBenefitArea(BaseModel):
String(256),
primary_key=True,
)
societal_benefit_sub_areas = relationship(
'SocietalBenefitSubArea',
back_populates='societal_benefit_area',
)


class SocietalBenefitSubArea(BaseModel):
__tablename__ = 'societal_benefit_subarea'
id = Column(
String(256),
primary_key=True,
)
societal_benefit_area_id = Column(
String(256),
ForeignKey('societal_benefit_area.id'),
nullable=False,
)

societal_benefit_area = relationship(
'SocietalBenefitArea',
back_populates='societal_benefit_sub_areas',
)
societal_benefit_key_objectives = relationship(
'SocietalBenefitKeyObjective',
back_populates='societal_benefit_sub_area',
)


class SocietalBenefitKeyObjective(BaseModel):
__tablename__ = 'societal_benefit_key_objective'
id = Column(
String(256),
primary_key=True,
)
societal_benefit_subarea_id = Column(
String(256),
ForeignKey('societal_benefit_subarea.id'),
primary_key=True,
)

societal_benefit_sub_area = relationship(
'SocietalBenefitSubArea',
back_populates='societal_benefit_key_objectives',
)

0 comments on commit dcdc2dd

Please sign in to comment.