Create names for columns

Addresses #17 but it feels like we should have these definitions
in the dbConfig.  Which leads to the question of moving from
QtSql to Pony ORM
This commit is contained in:
Christopher T. Johnson
2025-02-26 16:47:33 -05:00
parent be07589f24
commit 6129258f1b
3 changed files with 36 additions and 22 deletions

View File

@@ -1,10 +1,9 @@
import datetime
from typing import Any, cast
import enum
from typing import Any
from PySide6.QtCore import (
QAbstractTableModel,
QDate,
QDateTime,
QModelIndex,
QPersistentModelIndex,
Qt,
@@ -18,6 +17,10 @@ from lib.utils import query_error
class docketModel(QAbstractTableModel):
entries: list[list[str | None]] = []
class ColumnNames(enum.IntEnum):
date = 0
text = 1
def __init__(self, case_id: int | None = None) -> None:
super(docketModel, self).__init__()
if case_id == None: