Skip to content

feat: SQLModel persistence layer #19

@strausmann

Description

@strausmann

Goal

Implement SQLModel models + migrations for printers, templates, presets, jobs, printer_state, printer_status_cache.

Schema (from spec)

See full schema in Brother PT raster spec — relevant subset:

  • printers
  • templates (seed-loaded)
  • presets
  • jobs (UUID id, state machine)
  • printer_state (worker active/paused)
  • printer_status_cache (last ESC i S block)

Tasks

  • SQLModel classes
  • Async session/engine setup with aiosqlite
  • Migration tool (Alembic? or hand-written for v1)
  • Seed loader for 6 default templates
  • On startup: any queued/printing job → failed_restart (retry candidate)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions