payfrit-api/api/tasks/team/schema.sql
Mike e3933ce0c8 Add team task tracker API endpoints
New endpoints at api/tasks/team/ for centralized bot task tracking:
- POST create.php — register a new task
- POST update.php — change status, add notes (auto-sets PausedOn/CompletedOn)
- GET active.php — list active/paused tasks, optional BotName filter
- GET list.php — full listing with filters (BotName, Status, Channel, AssignedBy, Since) and pagination

Includes schema.sql for the TeamTasks table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-23 19:00:12 +00:00

17 lines
754 B
SQL

-- TeamTasks: Centralized task tracker for all bots
-- Run against payfrit_dev (and later payfrit prod)
CREATE TABLE IF NOT EXISTS TeamTasks (
ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
BotName VARCHAR(50) NOT NULL,
Title VARCHAR(255) NOT NULL,
Status ENUM('active','paused','done','cancelled') NOT NULL DEFAULT 'active',
Channel VARCHAR(100) DEFAULT NULL,
StartedOn DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
PausedOn DATETIME DEFAULT NULL,
CompletedOn DATETIME DEFAULT NULL,
Notes TEXT DEFAULT NULL,
AssignedBy VARCHAR(50) DEFAULT NULL,
INDEX idx_status (Status),
INDEX idx_botname (BotName)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;