service_man/api/models/base_model.py

14 lines
291 B
Python
Raw Normal View History

2024-03-06 02:28:59 +03:00
import uuid
from sqlalchemy.dialects.postgresql import UUID
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column
2024-03-29 00:29:35 +03:00
class BaseModel(DeclarativeBase):
2024-03-11 21:07:01 +03:00
__abstract__ = True
2024-03-06 02:28:59 +03:00
id: Mapped[uuid.UUID] = mapped_column(
UUID(as_uuid=True),
primary_key=True,
)