Files
xenia-pos-local/local_backend/schemas/message.py
bonamin 34ae328b0d feat: bump client-services (accumulated feature work + deploy fixes)
Snapshot of in-progress work across local_backend, manager_dashboard,
and waiter_pwa (pricing, chat, fiscal, prep zones, recovery codes, CRM,
inventory, permissions), plus the nginx/docker-compose deploy fixes for
the Unraid + NPM reverse-proxy setup.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-19 10:00:14 +03:00

45 lines
1.0 KiB
Python

from pydantic import BaseModel
from typing import Optional, List
from datetime import datetime
class QuickTemplateCreate(BaseModel):
body: str
sort_order: Optional[int] = 0
class QuickTemplateUpdate(BaseModel):
body: Optional[str] = None
sort_order: Optional[int] = None
is_active: Optional[bool] = None
class QuickTemplateOut(BaseModel):
id: int
body: str
sort_order: int
is_active: bool
model_config = {"from_attributes": True}
class SendMessageRequest(BaseModel):
body: str
target_waiter_ids: List[int] # empty = all active waiters
table_ids: Optional[List[int]] = []
class StaffMessageOut(BaseModel):
id: int
sender_id: int
sender_name: Optional[str] = None
body: str
target_waiter_ids: str # raw JSON string — frontend parses
table_ids: str
message_type: str = "manager"
kds_zone: Optional[str] = None
created_at: datetime
acked_by: List[int] = [] # waiter ids who have acked
model_config = {"from_attributes": True}