From ffa472d81caecae933000d58033de7b0a99cdb5a Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 14 Mar 2017 19:49:38 +0100 Subject: * model for user registration confirmation process --- app/backend/rcal/model.py | 7 ++++++- app/frontend/model/MailQueue.php | 4 +++- app/frontend/model/User.php | 12 ++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/app/backend/rcal/model.py b/app/backend/rcal/model.py index 61f0047..c795262 100644 --- a/app/backend/rcal/model.py +++ b/app/backend/rcal/model.py @@ -145,11 +145,15 @@ class User(BASE): id = Column(Integer, primary_key=True) login = Column(String(255), unique=True, index=True) password = Column(String(255)) + e_mail = Column(String(255)) + activation_hash = Column(String(32), index=True) + is_active = Column(Boolean, index=True) + activation_date = Column(UTCDateTime) + last_login = Column(UTCDateTime) is_admin = Column(Boolean) timezone = Column(String(255)) language = Column(String(8)) grouped_view = Column(Boolean) - last_login = Column(UTCDateTime) auth_keys = relationship( 'UserAuthKey', @@ -197,5 +201,6 @@ class MailQueue(BASE): default=0, server_default='0', index=True) create_time = Column(UTCDateTime, index=True) last_attempt_time = Column(UTCDateTime, index=True) + last_error_info = Column(Text) __all__ = ('Calendar', 'Entry', 'Category', 'User', 'UserAuthKey', 'MailQueue') diff --git a/app/frontend/model/MailQueue.php b/app/frontend/model/MailQueue.php index d7110f2..9a42e05 100644 --- a/app/frontend/model/MailQueue.php +++ b/app/frontend/model/MailQueue.php @@ -16,6 +16,7 @@ class MailQueue extends ActiveRecord { public $SendAttempts = 0; public $CreateTime; public $LastAttemptTime; + public $LastErrorInfo; public static $COLUMN_MAPPING = [ 'id' => 'ID', @@ -27,7 +28,8 @@ class MailQueue extends ActiveRecord { 'is_sent' => 'IsSent', 'send_attempts' => 'SendAttempts', 'create_time' => 'CreateTime', - 'last_attempt_time' => 'LastAttemptTime' + 'last_attempt_time' => 'LastAttemptTime', + 'last_error_info' => 'LastErrorInfo' ]; } diff --git a/app/frontend/model/User.php b/app/frontend/model/User.php index 21335e2..57f49b9 100644 --- a/app/frontend/model/User.php +++ b/app/frontend/model/User.php @@ -10,21 +10,29 @@ class User extends ActiveRecord { public $ID; public $Login; public $Password; + public $EMail; + public $ActivationHash; + public $IsActive; + public $ActivationDate; + public $LastLogin; public $IsAdmin; public $Timezone; public $Language; public $GroupedView; - public $LastLogin; public static $COLUMN_MAPPING = [ 'id' => 'ID', 'login' => 'Login', 'password' => 'Password', + 'e_mail' => 'EMail', + 'activation_hash' => 'ActivationHash', + 'is_active' => 'IsActive', + 'activation_date' => 'ActivationDate', + 'last_login' => 'LastLogin', 'is_admin' => 'IsAdmin', 'timezone' => 'Timezone', 'language' => 'Language', 'grouped_view' => 'GroupedView', - 'last_login' => 'LastLogin' ]; public static $RELATIONS = [ -- cgit v1.2.3