20 lines
471 B
Python
20 lines
471 B
Python
from sqlalchemy import Boolean, Column, String
|
|
|
|
from .base import Base
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
email = Column(String, unique=True)
|
|
hashed_password = Column(String)
|
|
is_active = Column(Boolean, default=True)
|
|
|
|
def __repr__(self):
|
|
return (
|
|
f"<User(id={self.id}, "
|
|
f'email="{self.email}", '
|
|
f'hashed_password="{self.hashed_password}", '
|
|
f"is_active={self.is_active})>"
|
|
)
|