Source code for app.models.user

from sqlalchemy import Boolean, Column, Integer, String
from sqlalchemy.orm import relationship

from app.db.base_class import Base


[docs]class User(Base): id = Column(Integer, primary_key=True, index=True) user_name = Column(String, unique=True, index=True, nullable=False) hashed_password = Column(String, nullable=False) # These are only used to encode and validate payloads, and # can be reset at any time. Not related to the hashed password secret_key = Column(String, nullable=True) is_active = Column(Boolean(), default=True) is_superuser = Column(Boolean(), default=False) jobs = relationship("Job", back_populates="owner")

Last update: Mar 10, 2024