from sqlalchemy import Boolean, Column, String from sqlalchemy.orm import Mapped from api.schemas.user_schema import UserSchema from .base import Base class User(Base): __tablename__ = "users" name: Mapped[str] email = Column(String, unique=True) hashed_password = Column(String) is_active = Column(Boolean, default=True) def __repr__(self): return ( f"" ) def to_read_model(self) -> UserSchema: return UserSchema( id=self.id, name=self.name, )