start project
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
"""NEW table (Method A, Ch08 follow-up) — not in Chapter 06's original
|
||||
list. Gives Top Referrers a rollup data source instead of scanning
|
||||
log_entries live. Domain-bucketed to keep cardinality bounded."""
|
||||
from __future__ import annotations
|
||||
|
||||
from app.extensions import db
|
||||
|
||||
|
||||
class ReferrerStatsDaily(db.Model):
|
||||
__tablename__ = "referrer_stats_daily"
|
||||
|
||||
date = db.Column(db.Date, primary_key=True)
|
||||
referrer_domain: str = db.Column(db.String(255), primary_key=True)
|
||||
count: int = db.Column(db.Integer, nullable=False, default=0)
|
||||
Reference in New Issue
Block a user