Backend finished
Co-authored-by: Álvaro <alvaro6gv@users.noreply.github.com>
This commit is contained in:
10
backend/app/models/user.py
Normal file
10
backend/app/models/user.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from sqlalchemy import Column, Integer, String, Boolean
|
||||
from app.db.database import Base
|
||||
|
||||
class UserModel(Base):
|
||||
__tablename__ = "users"
|
||||
user_id = Column(Integer, primary_key=True, autoincrement=True)
|
||||
user_name = Column(String(64), unique=True, nullable=False)
|
||||
password = Column(String(256), nullable=False)
|
||||
totp_secret = Column(String(32), nullable=True)
|
||||
has_2fa = Column(Boolean(False), default=False, nullable=False)
|
||||
Reference in New Issue
Block a user