Includes all work to date: - local_backend: FastAPI backend with products, orders, tables, shifts, cloud sync - manager_dashboard: React manager UI with product/category management, reports, settings - waiter_pwa: React PWA for waiter devices - Category reparent endpoint and UI - Waiter domain: local_ip sent on heartbeat, waiter_domain persisted from cloud response - QR code modal in AppInfoTab for waiter domain - Product form: number input spinners removed, category pre-selected on new product - Category row: count badge moved to far right Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
602 B
Python
32 lines
602 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
|
|
|
|
PROTOCOLS = ["escpos_tcp"] # extend later as needed
|
|
|
|
|
|
class PrinterBase(BaseModel):
|
|
name: str
|
|
ip_address: str
|
|
port: int = 9100
|
|
is_active: bool = True
|
|
protocol: str = "escpos_tcp"
|
|
|
|
|
|
class PrinterCreate(PrinterBase):
|
|
pass
|
|
|
|
|
|
class PrinterUpdate(BaseModel):
|
|
name: Optional[str] = None
|
|
ip_address: Optional[str] = None
|
|
port: Optional[int] = None
|
|
is_active: Optional[bool] = None
|
|
protocol: Optional[str] = None
|
|
|
|
|
|
class PrinterOut(PrinterBase):
|
|
id: int
|
|
|
|
model_config = {"from_attributes": True}
|