Update models for event sourcing

This commit is contained in:
2025-12-10 15:58:59 +09:00
parent 1b251195cd
commit 4b7759f27c
15 changed files with 945 additions and 222 deletions
+16
View File
@@ -0,0 +1,16 @@
from datetime import datetime
from sqlalchemy import Integer, DateTime
from sqlalchemy.orm import Mapped, mapped_column
from dibbler.models import Base
class ProductCache(Base):
product_id: Mapped[int] = mapped_column(Integer, primary_key=True)
price: Mapped[int] = mapped_column(Integer)
price_timestamp: Mapped[datetime] = mapped_column(DateTime)
stock: Mapped[int] = mapped_column(Integer)
stock_timestamp: Mapped[datetime] = mapped_column(DateTime)