2024-03-31 21:07:59 +03:00
|
|
|
import uuid
|
|
|
|
|
|
|
|
from sqlalchemy import UUID
|
|
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
|
|
|
|
from api.infrastructure.persistence.models.base import Base
|
|
|
|
|
|
|
|
|
|
|
|
class UserModel(Base):
|
2024-04-01 12:19:10 +03:00
|
|
|
__tablename__ = "users"
|
2024-03-31 21:07:59 +03:00
|
|
|
|
|
|
|
id: Mapped[uuid.UUID] = mapped_column(
|
|
|
|
UUID(as_uuid=True),
|
|
|
|
primary_key=True,
|
|
|
|
)
|
|
|
|
name: Mapped[str]
|
|
|
|
email: Mapped[str] = mapped_column(unique=True)
|
|
|
|
hashed_password: Mapped[str]
|