first commit

This commit is contained in:
Anurag Jangid 2026-10-08 02:52:58 +05:30
commit 34ea15a54d
246 changed files with 18660 additions and 0 deletions

View file

@ -0,0 +1,19 @@
from datetime import datetime
from sqlalchemy import DateTime, String, Text, func
from sqlalchemy.orm import Mapped, mapped_column
from app.db.base import Base
class PaymentWebhookEvent(Base):
"""Idempotent record of processed payment provider webhook events."""
__tablename__ = "payment_webhook_events"
id: Mapped[int] = mapped_column(primary_key=True)
provider: Mapped[str] = mapped_column(String(32), index=True)
provider_event_id: Mapped[str] = mapped_column(String(128), unique=True, index=True)
event_type: Mapped[str] = mapped_column(String(64))
payload: Mapped[str] = mapped_column(Text)
processed_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())