Feature: Walk-Einladungen und RSVP-System
Gassi-Treffen bekommen ein vollständiges Einladungs- und RSVP-System: - Neue Tabelle walk_invitations (walk_id, user_id, status, Zeitstempel) - Backend: /invite-candidates, /invite, /rsvp, /participants Endpoints - Push-Notification beim Einladen - Frontend: RSVP-Buttons (Zusagen/Vielleicht/Absagen), Teilnehmerliste mit Avatar-Initialen und farbkodierten RSVP-Badges, Einladen-Modal - SW by-v205, APP_VER 173
This commit is contained in:
parent
e3230237a2
commit
066b722c5e
7 changed files with 489 additions and 18 deletions
|
|
@ -464,6 +464,8 @@ def _migrate(conn_factory):
|
|||
("dogs", "foto_zoom", "REAL NOT NULL DEFAULT 1.0"),
|
||||
("dogs", "foto_offset_x", "REAL NOT NULL DEFAULT 0.0"),
|
||||
("dogs", "foto_offset_y", "REAL NOT NULL DEFAULT 0.0"),
|
||||
# Tagebuch: Ortsname (POI/Adresse)
|
||||
("diary", "location_name", "TEXT"),
|
||||
]
|
||||
with conn_factory() as conn:
|
||||
for table, column, col_type in migrations:
|
||||
|
|
@ -736,3 +738,19 @@ def _migrate(conn_factory):
|
|||
CREATE INDEX IF NOT EXISTS idx_service_offers_type ON service_offers(type, aktiv);
|
||||
CREATE INDEX IF NOT EXISTS idx_service_offers_user ON service_offers(user_id, type);
|
||||
""")
|
||||
|
||||
# Walk-Einladungen (RSVP)
|
||||
conn.executescript("""
|
||||
CREATE TABLE IF NOT EXISTS walk_invitations (
|
||||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||||
walk_id INTEGER NOT NULL REFERENCES walks(id) ON DELETE CASCADE,
|
||||
user_id INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
status TEXT NOT NULL DEFAULT 'invited',
|
||||
invited_at TEXT NOT NULL DEFAULT (datetime('now')),
|
||||
responded_at TEXT,
|
||||
UNIQUE(walk_id, user_id)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_walk_inv_walk ON walk_invitations(walk_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_walk_inv_user ON walk_invitations(user_id, status);
|
||||
""")
|
||||
logger.info("Migration: walk_invitations Tabelle bereit.")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue