# Phase 10 Backend Contract — Tenant Content Modules (Gorbushka-class tenants) Companion to [PRODUCT-PLAN-v3.1-DELIVERY-PLAN.md](../PRODUCT-PLAN-v3.1-DELIVERY-PLAN.md) Phase 10 (Sprints 10.1–10.2). Covers plan §11. **Status: ready to build, lowest priority.** Only after Commerce Core (Phases 1–7) is real — the plan is explicit that this tenant type does not define the platform architecture; it is one configuration of the shared runtime, not a separate build. --- ## 1. Entities ```ts interface Shop { id: string; marketplaceId: string; shopCategoryId: string; name: string; floorId?: string; status: 'draft' | 'published'; } interface ShopCategory { id: string; marketplaceId: string; title: string; } interface Service { id: string; marketplaceId: string; title: string; description: string; status: 'draft' | 'published'; } interface Floor { id: string; marketplaceId: string; order: number; label: string; } interface SchemePin { id: string; marketplaceId: string; floorId: string; shopId?: string; x: number; y: number; } interface RentListing { id: string; marketplaceId: string; title: string; areaSqm: number; floorId?: string; status: 'available' | 'leased'; } interface Lead { id: string; marketplaceId: string; rentListingId?: string; contactName: string; contactPhone: string; message?: string; createdAt: string; } interface NewsPromo { id: string; marketplaceId: string; title: string; body: string; publishedAt?: string; } interface MallSettings { marketplaceId: string; openingHours: Record; contactInfo: Record; } ``` Every entity above carries `marketplaceId`, an audit trail, and the same draft/preview/publish flow as [Phase 9's revision model](PHASE-9-TENANT-REGISTRY-DOMAINS-CONTRACT.md) §5 — not a separate content pipeline. ## 2. Endpoints ``` GET/POST/PATCH/DELETE /api/admin/v2/content/shops GET/POST/PATCH/DELETE /api/admin/v2/content/shop-categories GET/POST/PATCH/DELETE /api/admin/v2/content/services GET/POST/PATCH/DELETE /api/admin/v2/content/floors GET/POST/PATCH/DELETE /api/admin/v2/content/scheme-pins GET/POST/PATCH/DELETE /api/admin/v2/content/rent-listings POST /api/admin/v2/content/rent-listings/{id}/leads GET/POST/PATCH/DELETE /api/admin/v2/content/news PATCH /api/admin/v2/content/mall-settings ``` ## 3. Tenant feature configuration (Gorbushka's v1 default, per plan §11.1) ```json { "cms": true, "shops": true, "services": true, "mallScheme": true, "rentListings": true, "news": true, "seoMedia": true, "catalog": false, "sellerPortal": false, "cart": false, "checkout": false, "payments": false, "orders": false } ``` Commerce modules are **platform-ready but off** — the point of Phase 10 is proving this tenant can flip `catalog`/`cart`/`checkout`/etc. to `true` later via [Phase 9's `MarketplaceFeatureSet`](PHASE-9-TENANT-REGISTRY-DOMAINS-CONTRACT.md) with zero backend or storefront code changes, since the commerce core is already generic by the time Phase 10 starts. ## 4. What the frontend will start doing once this ships - Mall scheme / floor / pin editor UI. - Rent listing + lead capture forms. - Confirm the existing Gorbushka frontend/archive is used as UX reference only — production data and auth route through the shared platform per ADR-0001.