Some checks failed
CD Pipeline / deploy (push) Failing after 59s
- 建立 Gitea Actions CD pipeline (.gitea/workflows/cd.yaml) - 部署模式: rsync Python 檔案至 188 → docker restart (volume mount) - Dockerfile/requirements 變動時自動重建 Docker image - 部署通知: Telegram (開始/成功/失敗) - 健康檢查: https://mo.wooo.work/health (最多 5 次重試) - 同步最新 CLAUDE.md / ADR-008 / memory (2026-04-19) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 lines
994 B
Python
30 lines
994 B
Python
from sqlalchemy import Column, Integer, String, DateTime, Text
|
|
from datetime import datetime
|
|
from database.models import Base
|
|
|
|
class PromoProduct(Base):
|
|
"""
|
|
EDM (限時搶購) 商品資料表
|
|
用於儲存從 MOMO 限時搶購頁面抓取的商品資訊
|
|
"""
|
|
__tablename__ = 'promo_products'
|
|
|
|
id = Column(Integer, primary_key=True, autoincrement=True)
|
|
batch_id = Column(String(64), index=True)
|
|
crawled_at = Column(DateTime, default=datetime.now)
|
|
|
|
time_slot = Column(String(20))
|
|
activity_time_text = Column(String(100))
|
|
session_time_text = Column(String(100))
|
|
|
|
i_code = Column(String(50), index=True)
|
|
name = Column(String(255))
|
|
price = Column(Integer)
|
|
discount_text = Column(String(20))
|
|
url = Column(Text)
|
|
image_url = Column(Text)
|
|
previous_price = Column(Integer)
|
|
remain_qty = Column(Integer)
|
|
|
|
status_change = Column(String(20), default='NEW')
|
|
page_type = Column(String(50), default='edm', index=True) |