- Standardize quote style (single to double quotes) - Reorder and group imports alphabetically - Fix line breaks and indentation for consistency - Apply PEP 8 formatting standards Also updated Makefile to exclude both venv and .venv from code quality checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
18 lines
460 B
Python
18 lines
460 B
Python
from datetime import datetime, timezone
|
|
|
|
from sqlalchemy import Column, DateTime
|
|
|
|
from app.core.database import Base
|
|
|
|
|
|
class TimestampMixin:
|
|
"""Mixin to add created_at and updated_at timestamps to models"""
|
|
|
|
created_at = Column(DateTime, default=datetime.now(timezone.utc), nullable=False)
|
|
updated_at = Column(
|
|
DateTime,
|
|
default=datetime.now(timezone.utc),
|
|
onupdate=datetime.now(timezone.utc),
|
|
nullable=False,
|
|
)
|