606b7bd6b3
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
18 lines
643 B
Python
18 lines
643 B
Python
import uuid
|
|
|
|
from sqlalchemy import Boolean, String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class User(Base):
|
|
__tablename__ = "users"
|
|
|
|
id: Mapped[str] = mapped_column(String, primary_key=True, default=lambda: str(uuid.uuid4()))
|
|
email: Mapped[str] = mapped_column(String, unique=True, index=True, nullable=False)
|
|
hashed_password: Mapped[str] = mapped_column(String, nullable=False)
|
|
full_name: Mapped[str] = mapped_column(String, nullable=True)
|
|
is_active: Mapped[bool] = mapped_column(Boolean, default=True)
|
|
is_superuser: Mapped[bool] = mapped_column(Boolean, default=False)
|