feat: schedule rework

This commit is contained in:
2026-08-18 19:22:21 +01:00
parent 483dc666d1
commit 5024af2789
13 changed files with 997 additions and 392 deletions
+8 -1
View File
@@ -110,7 +110,14 @@ CREATE TABLE IF NOT EXISTS schedules (
status TEXT NOT NULL DEFAULT 'pending', -- pending, accepted, declined, reschedule_requested
description TEXT,
reminder_sent BOOLEAN NOT NULL DEFAULT FALSE,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
-- Reschedule negotiation: a proposed new time awaiting the counterpart's
-- response, kept separate from scheduled_at until accepted.
proposed_at TIMESTAMPTZ,
proposed_by BIGINT,
-- Snapshot of status before entering reschedule_requested, so a decline
-- knows whether to revert to 'pending' or 'accepted'.
pre_reschedule_status TEXT
);
CREATE TABLE IF NOT EXISTS schedule_messages (