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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user