Created detailed documentation for all 51 architectural rules: New Documentation: - docs/development/architecture-rules.md (comprehensive reference) - Added to mkdocs.yml navigation Documentation Includes: - Overview and usage instructions - Severity level explanations - All 51 rules organized by category: * Backend Rules (API, Service, Model, Exception) * Frontend Rules (JavaScript, Templates, Styling) * Naming Convention Rules * Security & Multi-Tenancy Rules * Code Quality Rules * Middleware Rules For Each Rule: - Rule ID and name - Severity level - Detailed description - Good and bad code examples - Anti-patterns detected - File patterns affected Additional Sections: - Quick reference tables - Pre-commit checklist - Common violations and fixes - Ignored patterns explanation - Summary statistics (51 rules, 35 errors, 16 warnings) This documentation complements: - .architecture-rules.yaml (rule definitions) - scripts/validate_architecture.py (enforcement) - Code Quality guide - Contributing guide Documentation builds successfully with mkdocs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
18 lines
428 B
Python
18 lines
428 B
Python
from datetime import UTC, datetime
|
|
|
|
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(UTC), nullable=False)
|
|
updated_at = Column(
|
|
DateTime,
|
|
default=datetime.now(UTC),
|
|
onupdate=datetime.now(UTC),
|
|
nullable=False,
|
|
)
|