mirror of
https://gitlab.ub.uni-bielefeld.de/sfb1288inf/nopaque.git
synced 2024-12-24 10:34:17 +00:00
Add creation and registration dates.
This commit is contained in:
parent
5a67164dbe
commit
175dbceac6
@ -4,6 +4,7 @@ from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
|
|||||||
from werkzeug.security import generate_password_hash, check_password_hash
|
from werkzeug.security import generate_password_hash, check_password_hash
|
||||||
from . import db
|
from . import db
|
||||||
from . import login_manager
|
from . import login_manager
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
|
|
||||||
class Permission:
|
class Permission:
|
||||||
@ -106,6 +107,7 @@ class User(UserMixin, db.Model):
|
|||||||
# Primary key
|
# Primary key
|
||||||
id = db.Column(db.Integer, primary_key=True)
|
id = db.Column(db.Integer, primary_key=True)
|
||||||
confirmed = db.Column(db.Boolean, default=False)
|
confirmed = db.Column(db.Boolean, default=False)
|
||||||
|
registration_date = db.Column(db.DateTime(), default=datetime.utcnow)
|
||||||
email = db.Column(db.String(64), unique=True, index=True)
|
email = db.Column(db.String(64), unique=True, index=True)
|
||||||
password_hash = db.Column(db.String(128))
|
password_hash = db.Column(db.String(128))
|
||||||
role_id = db.Column(db.Integer, db.ForeignKey('roles.id'))
|
role_id = db.Column(db.Integer, db.ForeignKey('roles.id'))
|
||||||
@ -203,6 +205,7 @@ class AnonymousUser(AnonymousUserMixin):
|
|||||||
"""
|
"""
|
||||||
Model replaces the default AnonymousUser.
|
Model replaces the default AnonymousUser.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def can(self, permissions):
|
def can(self, permissions):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@ -217,6 +220,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)
|
||||||
|
creation_date = db.Column(db.DateTime(), default=datetime.utcnow)
|
||||||
description = db.Column(db.String(64))
|
description = db.Column(db.String(64))
|
||||||
'''
|
'''
|
||||||
' Requested ressources.
|
' Requested ressources.
|
||||||
|
Loading…
Reference in New Issue
Block a user