service_man/api/infrastructure/persistence/models/user.py

20 lines
442 B
Python
Raw Permalink Normal View History

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]
2024-04-21 23:46:17 +03:00
last_name: Mapped[str]
2024-03-31 21:07:59 +03:00
email: Mapped[str] = mapped_column(unique=True)
hashed_password: Mapped[str]