Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nopaque
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SFB 1288 - INF
nopaque
Commits
76e7d650
Commit
76e7d650
authored
4 years ago
by
Stephan Porada
Browse files
Options
Downloads
Patches
Plain Diff
Some comments
parent
a879558e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/models.py
+8
-0
8 additions, 0 deletions
app/models.py
with
8 additions
and
0 deletions
app/models.py
+
8
−
0
View file @
76e7d650
...
@@ -28,6 +28,7 @@ class Role(db.Model):
...
@@ -28,6 +28,7 @@ class Role(db.Model):
__tablename__
=
'
roles
'
__tablename__
=
'
roles
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
default
=
db
.
Column
(
db
.
Boolean
,
default
=
False
,
index
=
True
)
default
=
db
.
Column
(
db
.
Boolean
,
default
=
False
,
index
=
True
)
name
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
)
name
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
)
permissions
=
db
.
Column
(
db
.
Integer
)
permissions
=
db
.
Column
(
db
.
Integer
)
...
@@ -103,12 +104,14 @@ class User(UserMixin, db.Model):
...
@@ -103,12 +104,14 @@ class User(UserMixin, db.Model):
__tablename__
=
'
users
'
__tablename__
=
'
users
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
confirmed
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
confirmed
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
email
=
db
.
Column
(
db
.
String
(
254
),
unique
=
True
,
index
=
True
)
email
=
db
.
Column
(
db
.
String
(
254
),
unique
=
True
,
index
=
True
)
password_hash
=
db
.
Column
(
db
.
String
(
128
))
password_hash
=
db
.
Column
(
db
.
String
(
128
))
registration_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
registration_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
role_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
'
roles.id
'
))
role_id
=
db
.
Column
(
db
.
Integer
,
db
.
ForeignKey
(
'
roles.id
'
))
username
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
,
index
=
True
)
username
=
db
.
Column
(
db
.
String
(
64
),
unique
=
True
,
index
=
True
)
# Setting Fields
setting_dark_mode
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
setting_dark_mode
=
db
.
Column
(
db
.
Boolean
,
default
=
False
)
# Relationships
# Relationships
corpora
=
db
.
relationship
(
'
Corpus
'
,
backref
=
'
creator
'
,
lazy
=
'
dynamic
'
,
corpora
=
db
.
relationship
(
'
Corpus
'
,
backref
=
'
creator
'
,
lazy
=
'
dynamic
'
,
...
@@ -233,6 +236,7 @@ class JobInput(db.Model):
...
@@ -233,6 +236,7 @@ class JobInput(db.Model):
__tablename__
=
'
job_inputs
'
__tablename__
=
'
job_inputs
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
filename
=
db
.
Column
(
db
.
String
(
255
))
filename
=
db
.
Column
(
db
.
String
(
255
))
dir
=
db
.
Column
(
db
.
String
(
255
))
dir
=
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
'
))
...
@@ -256,6 +260,7 @@ class JobResult(db.Model):
...
@@ -256,6 +260,7 @@ class JobResult(db.Model):
__tablename__
=
'
job_results
'
__tablename__
=
'
job_results
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
filename
=
db
.
Column
(
db
.
String
(
255
))
filename
=
db
.
Column
(
db
.
String
(
255
))
dir
=
db
.
Column
(
db
.
String
(
255
))
dir
=
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
'
))
...
@@ -279,6 +284,7 @@ class Job(db.Model):
...
@@ -279,6 +284,7 @@ class Job(db.Model):
__tablename__
=
'
jobs
'
__tablename__
=
'
jobs
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
creation_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
creation_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
description
=
db
.
Column
(
db
.
String
(
255
))
description
=
db
.
Column
(
db
.
String
(
255
))
end_date
=
db
.
Column
(
db
.
DateTime
())
end_date
=
db
.
Column
(
db
.
DateTime
())
...
@@ -349,6 +355,7 @@ class CorpusFile(db.Model):
...
@@ -349,6 +355,7 @@ class CorpusFile(db.Model):
__tablename__
=
'
corpus_files
'
__tablename__
=
'
corpus_files
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
address
=
db
.
Column
(
db
.
String
(
255
))
address
=
db
.
Column
(
db
.
String
(
255
))
author
=
db
.
Column
(
db
.
String
(
255
))
author
=
db
.
Column
(
db
.
String
(
255
))
booktitle
=
db
.
Column
(
db
.
String
(
255
))
booktitle
=
db
.
Column
(
db
.
String
(
255
))
...
@@ -395,6 +402,7 @@ class Corpus(db.Model):
...
@@ -395,6 +402,7 @@ class Corpus(db.Model):
__tablename__
=
'
corpora
'
__tablename__
=
'
corpora
'
# Primary key
# Primary key
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
id
=
db
.
Column
(
db
.
Integer
,
primary_key
=
True
)
# Fields
creation_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
creation_date
=
db
.
Column
(
db
.
DateTime
(),
default
=
datetime
.
utcnow
)
description
=
db
.
Column
(
db
.
String
(
255
))
description
=
db
.
Column
(
db
.
String
(
255
))
status
=
db
.
Column
(
db
.
String
(
16
))
status
=
db
.
Column
(
db
.
String
(
16
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment