Files
xenia-pos-local/local_backend/schemas/printer.py
bonamin f3d03bf85f feat: printer duplicate copies setting (Feature 1)
- Add `duplicates` column (0-9) to printers table via migration
- Print loop repeats job 1+duplicates times per printer zone
- PrinterForm in Settings > Print now has ΑΝΤΙΓΡΑΦΑ (0-9) field
- PrinterRow shows amber badge when duplicates > 0

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 10:55:43 +03:00

36 lines
725 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"
line_width: int = 48
duplicates: int = 0
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
line_width: Optional[int] = None
duplicates: Optional[int] = None
class PrinterOut(PrinterBase):
id: int
model_config = {"from_attributes": True}