feat(filters): date-range filtering on PlayEventFilter.started/ended (#67)
Change PlayEventFilter.started/ended from StringCriterion to DateCriterion so they support GREATER_THAN / LESS_THAN / BETWEEN, enabling "finished in year Y" to be expressed through the filter system. PlayEvent.started/ended are DateField columns, so the criteria apply with bare field names (no __date lookup, unlike SessionFilter.timestamp_start which is a datetime). This mirrors the existing PurchaseFilter DateField precedent. Deserialization auto-switches via the field annotation and the serialized JSON shape is unchanged, so the type change is backward-compatible. Prerequisite for #65 Tier-2 stats-page filtered links. Part of #61. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -899,8 +899,8 @@ class PlayEventFilter(OperatorFilter):
|
||||
NOT: PlayEventFilter | None = None
|
||||
|
||||
game: MultiCriterion | None = None # filters on game_id
|
||||
started: StringCriterion | None = None # date string
|
||||
ended: StringCriterion | None = None # date string
|
||||
started: DateCriterion | None = None # DateField, bare lookup
|
||||
ended: DateCriterion | None = None # DateField, bare lookup
|
||||
days_to_finish: IntCriterion | None = None
|
||||
note: StringCriterion | None = None
|
||||
created_at: StringCriterion | None = None
|
||||
|
||||
Reference in New Issue
Block a user