Skip to content

Commit

Permalink
21760 add business relationship into furnishing model (bcgov#2835)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzdev420 authored Jul 16, 2024
1 parent 96eaeb9 commit c4173d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions legal-api/src/legal_api/models/furnishing.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ class FurnishingStatus(BaseEnum):
batch_id = db.Column('batch_id', db.Integer, db.ForeignKey('batches.id'), index=True, nullable=False)
business_id = db.Column('business_id', db.Integer, db.ForeignKey('businesses.id'), index=True, nullable=False)

# relationships
business = db.relationship('Business', backref=db.backref('furnishings', lazy=True))

def save(self):
"""Save the object to the database immediately."""
db.session.add(self)
Expand Down

0 comments on commit c4173d0

Please sign in to comment.