feat(cli): improve member design and usability
This commit is contained in:
@@ -234,4 +234,20 @@ class MemberRepository(BaseRepository[MemberModel]):
|
||||
DeclineStreak = COALESCE(DeclineStreak, 0) + 1
|
||||
WHERE {self._PK} = ?
|
||||
"""
|
||||
self.db.execute(sql, (decline_date, member_id))
|
||||
self.db.execute(sql, (decline_date, member_id))
|
||||
|
||||
def reset_to_queue_front(self, member_id: int) -> None:
|
||||
"""
|
||||
Reset member timestamps to move them to the front of the round robin queue.
|
||||
This sets LastScheduledAt and LastAcceptedAt to far past values, effectively
|
||||
making them the highest priority for scheduling.
|
||||
"""
|
||||
sql = f"""
|
||||
UPDATE {self._TABLE}
|
||||
SET LastScheduledAt = '1970-01-01 00:00:00',
|
||||
LastAcceptedAt = '1970-01-01 00:00:00',
|
||||
LastDeclinedAt = NULL,
|
||||
DeclineStreak = 0
|
||||
WHERE {self._PK} = ?
|
||||
"""
|
||||
self.db.execute(sql, (member_id,))
|
||||
Reference in New Issue
Block a user