Atualizar app/models.py
This commit is contained in:
+9
-4
@@ -37,14 +37,17 @@ class Attachment(Base):
|
|||||||
|
|
||||||
class User(Base):
|
class User(Base):
|
||||||
__tablename__ = "users"
|
__tablename__ = "users"
|
||||||
id = Column(String, primary_key=True)
|
#id = Column(String, primary_key=True)
|
||||||
email = Column(String, unique=True)
|
#email = Column(String, unique=True)
|
||||||
|
email = Column(String, primary_key=True)
|
||||||
name = Column(String)
|
name = Column(String)
|
||||||
|
password = Column(String)
|
||||||
|
totp_secret = Column(String, nullable=True)
|
||||||
twofa_enabled = Column(Boolean, default=False)
|
twofa_enabled = Column(Boolean, default=False)
|
||||||
twofa_method = Column(String, default="totp")
|
twofa_method = Column(String, default="totp")
|
||||||
twofa_secret = Column(String)
|
twofa_secret = Column(String)
|
||||||
twofa_sensitive_actions = Column(Boolean, default=False)
|
twofa_sensitive_actions = Column(Boolean, default=False)
|
||||||
email = Column(String, primary_key=True)
|
|
||||||
role = Column(String, default="user") # "user", "admin"
|
role = Column(String, default="user") # "user", "admin"
|
||||||
can_use_audio = Column(Boolean, default=False)
|
can_use_audio = Column(Boolean, default=False)
|
||||||
can_use_vision = Column(Boolean, default=False)
|
can_use_vision = Column(Boolean, default=False)
|
||||||
@@ -53,7 +56,9 @@ class User(Base):
|
|||||||
can_export_pdf = Column(Boolean, default=True)
|
can_export_pdf = Column(Boolean, default=True)
|
||||||
can_export_md = Column(Boolean, default=True)
|
can_export_md = Column(Boolean, default=True)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Preferences(Base):
|
class Preferences(Base):
|
||||||
|
|||||||
Reference in New Issue
Block a user