Routing has been by prep zone only since v1, which nulled this column on every start, so the four fallbacks in printer_service.py never ran. Revision 0012 drops the column (its unnamed FK goes with the batch rebuild). The unused legacy GET /api/kds/items keeps its single 'no zone' group. Product create/update/export/import no longer mention it. Scheduled in plan step 1.0 for the catalogue rework (1.13). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22 lines
929 B
Python
22 lines
929 B
Python
from sqlalchemy import Column, Integer, String, Boolean
|
|
from sqlalchemy.orm import relationship
|
|
from database import Base
|
|
|
|
|
|
class Printer(Base):
|
|
__tablename__ = "printers"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String, nullable=False)
|
|
ip_address = Column(String, nullable=False)
|
|
port = Column(Integer, default=9100, nullable=False)
|
|
is_active = Column(Boolean, default=True, nullable=False)
|
|
protocol = Column(String, default="escpos_tcp", nullable=False)
|
|
line_width = Column(Integer, default=48, nullable=False)
|
|
duplicates = Column(Integer, default=0, nullable=False)
|
|
codepage_n = Column(Integer, default=29, nullable=False)
|
|
|
|
print_logs = relationship("PrintLog", back_populates="printer")
|
|
print_jobs = relationship("PrintJob", back_populates="printer")
|
|
prep_zones = relationship("PrepZone", secondary="prep_zone_printers", back_populates="printers")
|