small updates

This commit is contained in:
tpv committed 2026-06-19 10:18:23 -07:00
1 parent 25632e1938
commit 965af7e4ee
5 files changed
+57 -16

No files matched your search

+23 -1
View File
@@ -3,6 +3,28 @@ from dataclasses import field
from pydantic.dataclasses import dataclass
@dataclass
class ConsumerConfig:
# used claude to refactor the consumer building in the discord bot
"""Configuration for a single retailer's consumer.
Attributes:
monitor_name: Retailer name (matches setup_config key).
collection: MongoDB collection for this retailer's products.
channel_ids: Discord webhook/channel routing config.
min_percentage: Minimum discount % to trigger a ping.
ping_threshold: Price floor for the secondary 40% rule (e.g. Woot pings
on 40%+ discounts if the item is >= this price). None disables
the secondary rule.
"""
monitor_name: str
collection: object
channel_ids: dict
min_percentage: int
ping_threshold: int | None = None
@dataclass
class PricingInfo:
original_price: float
@@ -43,7 +65,7 @@ class Product:
product_id: str
title: str
url: str
pricing: PricingInfo
metadata: ProductMetadata = field(default_factory=ProductMetadata)
timing: ProductTiming = field(default_factory=ProductTiming)
pricing: PricingInfo = field(default_factory=PricingInfo)
availability: AvailabilityInfo = field(default_factory=AvailabilityInfo)