2026.06.04 frontend építés közben

This commit is contained in:
Roo
2026-06-04 07:26:22 +00:00
parent 7adf6cc3e3
commit 59a30ac428
3302 changed files with 24091 additions and 1771 deletions

View File

@@ -0,0 +1 @@
{"version":1,"resource":"vscode-remote://192.168.100.43:8443/home/coder/project/backend/app/services/notification_service.py","entries":[{"id":"ySrz.py","timestamp":1769041693523}]}

View File

@@ -0,0 +1,14 @@
from datetime import datetime, timedelta
from sqlalchemy import select
from app.models.user import User
from app.models.vehicle import Vehicle
from app.core.email import send_expiry_notification
async def check_expiring_documents(db: AsyncSession, background_tasks: BackgroundTasks):
# Példa: Műszaki vizsga lejárata 30 napon belül
threshold = datetime.now().date() + timedelta(days=30)
result = await db.execute(
select(Vehicle, User).join(User).where(Vehicle.mot_expiry_date <= threshold)
)
for vehicle, user in result.all():
send_expiry_notification(background_tasks, user.email, f"Műszaki vizsga ({vehicle.license_plate})")