feat(cloud): table bookings online, with food ordered ahead
Plan phase 3S, step S.6.
- New order types "reservation" (a table only, no items) and "preorder" (a table with food,
priced at the online_preorder sales point); online_orders.party_size (migration 0005).
- services/ordering.py: the venue's booking settings (ordering.reservations in the snapshot):
hours (none = any time), time grid, notice, days ahead (≤ 90), party size; res_slots per
venue day, res_days, res_check (order.service_unavailable, order.party_invalid,
order.time_invalid). The public menu's ordering summary gains `reservations`
{enabled, with_food, party_max, days}; GET /api/orders/{site}/reservation-slots?day=.
- Bookings need a phone; a plain booking refuses items (order.items_not_allowed).
- Status steps for bookings: pending_acceptance → accepted | rejected; accepted → delivered
(arrived) | cancelled (by the venue); ordinary orders unchanged.
- Order app: "Book a table" (people, day, time, optional food at the pre-order prices),
booking summary at checkout, a booking tracking page (waiting, confirmed, welcome;
declined / cancelled with the reason). en/el.
- Tests: tests/test_reservations.py (3), order-app logic test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
"""online orders: party_size (reservations online, plan phase 3S, S.6)
|
||||
|
||||
Revision ID: 0005_order_party_size
|
||||
Revises: 0004_order_area_id
|
||||
Create Date: 2026-11-16 21:00:00
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
revision = '0005_order_party_size'
|
||||
down_revision = '0004_order_area_id'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
with op.batch_alter_table('online_orders', schema=None) as batch_op:
|
||||
batch_op.add_column(sa.Column('party_size', sa.Integer(), nullable=True))
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
with op.batch_alter_table('online_orders', schema=None) as batch_op:
|
||||
batch_op.drop_column('party_size')
|
||||
Reference in New Issue
Block a user