Skip to content

Commit

Permalink
Add datafile relationship to model (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
digitaldogsbody committed Feb 26, 2024
1 parent 87108f8 commit cf7beb0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class User(Model):
primary_use = db.Column(db.JSON, nullable=True)
additional_info = db.Column(db.Text, nullable=True)
has_accessed = db.Column(db.Boolean, nullable=True)
datafile_id = db.Column(db.Integer, db.ForeignKey('datafiles.id'))
datafile = db.relationship('Datafile', lazy=True)

def generate_token(self):
return create_access_token(identity=self.id, expires_delta=timedelta(days=1))
Expand Down

0 comments on commit cf7beb0

Please sign in to comment.