
- Implemented user authentication with JWT tokens - Created product management endpoints - Added shopping cart functionality - Implemented order management system - Setup database models with SQLAlchemy - Created alembic migrations - Added health check endpoint generated with BackendIM... (backend.im)
15 lines
443 B
Python
15 lines
443 B
Python
from sqlalchemy import Column, Integer, DateTime
|
|
from sqlalchemy.sql import func
|
|
from app.db.session import Base
|
|
|
|
|
|
class TimestampMixin:
|
|
created_at = Column(DateTime(timezone=True), server_default=func.now())
|
|
updated_at = Column(
|
|
DateTime(timezone=True), server_default=func.now(), onupdate=func.now()
|
|
)
|
|
|
|
|
|
class BaseModel(Base, TimestampMixin):
|
|
__abstract__ = True
|
|
id = Column(Integer, primary_key=True, index=True) |