refactor(todo): 移除 due_at 字段,改用 order 字段管理象限内顺序

This commit is contained in:
qzl
2026-03-20 11:09:38 +08:00
parent d574128815
commit fbf15bc937
22 changed files with 1458 additions and 1524 deletions
+5 -4
View File
@@ -26,7 +26,7 @@ class TodoPriority(int, Enum):
class Todo(TimestampMixin, SoftDeleteMixin, Base):
__tablename__: str = "todos"
__table_args__ = {"extend_existing": True}
__table_args__: dict[str, bool] = {"extend_existing": True}
id: Mapped[uuid.UUID] = mapped_column(
UUID(as_uuid=True), primary_key=True, default=uuid.uuid4
@@ -43,9 +43,10 @@ class Todo(TimestampMixin, SoftDeleteMixin, Base):
String(1000),
nullable=True,
)
due_at: Mapped[datetime | None] = mapped_column(
DateTime(timezone=True),
nullable=True,
order: Mapped[int] = mapped_column(
Integer,
nullable=False,
default=0,
)
priority: Mapped[int] = mapped_column(
Integer,