feat: add MarketPlace model, migration, and market_url_for helper
Introduces per-page markets (Phase 2): - MarketPlace model with soft-delete and unique slug index - NavTop gains market_id FK to scope nav hierarchy per market - Migration with backfill creates default 'suma-market' for existing market page - market_url_for() cross-app URL helper Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -172,6 +172,14 @@ class Post(Base):
|
||||
passive_deletes=True,
|
||||
)
|
||||
|
||||
markets: Mapped[List["MarketPlace"]] = relationship(
|
||||
"MarketPlace",
|
||||
back_populates="post",
|
||||
cascade="all, delete-orphan",
|
||||
passive_deletes=True,
|
||||
order_by="MarketPlace.name",
|
||||
)
|
||||
|
||||
class Author(Base):
|
||||
__tablename__ = "authors"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user