mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-11-15 09:15:41 +00:00
Add new realtion
This commit is contained in:
parent
2c4a6a8cea
commit
82fb73de1a
@ -259,6 +259,11 @@ class JobInput(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
filename = db.Column(db.String(255))
|
filename = db.Column(db.String(255))
|
||||||
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
|
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
|
||||||
|
# Relationships
|
||||||
|
results = db.relationship('JobResult',
|
||||||
|
backref='job_input',
|
||||||
|
lazy='dynamic',
|
||||||
|
cascade='save-update, merge, delete')
|
||||||
|
|
||||||
|
|
||||||
class JobResult(db.Model):
|
class JobResult(db.Model):
|
||||||
@ -270,6 +275,7 @@ class JobResult(db.Model):
|
|||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
filename = db.Column(db.String(255))
|
filename = db.Column(db.String(255))
|
||||||
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
|
job_id = db.Column(db.Integer, db.ForeignKey('jobs.id'))
|
||||||
|
job_input_id = db.Column(db.Integer, db.ForeignKey('job_inputs.id'))
|
||||||
|
|
||||||
|
|
||||||
class Job(db.Model):
|
class Job(db.Model):
|
||||||
@ -384,7 +390,7 @@ class Corpus(db.Model):
|
|||||||
user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
|
user_id = db.Column(db.Integer, db.ForeignKey('users.id'))
|
||||||
# Relationships
|
# Relationships
|
||||||
files = db.relationship('CorpusFile',
|
files = db.relationship('CorpusFile',
|
||||||
backref='relation',
|
backref='corpus',
|
||||||
lazy='dynamic',
|
lazy='dynamic',
|
||||||
cascade='save-update, merge, delete')
|
cascade='save-update, merge, delete')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user