from datetime import datetime, timezone from sqlalchemy import DateTime from sqlalchemy.orm import Mapped, mapped_column from app.engine.postgresdb import Base class BaseModel: id: Mapped[int] = mapped_column(primary_key=True, index=True, autoincrement=True) created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), default=datetime.now(timezone.utc)) updated_at: Mapped[datetime] = mapped_column( DateTime(timezone=True), default=datetime.now(timezone.utc), onupdate=datetime.now(timezone.utc), )