feat: add appointments, campaigns, admin, storage, tests and various updates

- Add new routers: admin, appointments, campaigns
- Add storage service and logging config
- Add migrations directory and test suite with pytest config
- Add supabase_migration_features.sql
- Update models, dependencies, config, and existing routers
- Remove whatsapp_service (deleted)
- Update pyproject.toml and uv.lock dependencies

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
belviskhoremk
2026-04-03 09:11:58 +00:00
parent 9dccc83293
commit 92d4c2fc5e
51 changed files with 7076 additions and 515 deletions

View File

@@ -86,16 +86,14 @@ CREATE POLICY "feedback_select_owner" ON message_feedback FOR SELECT USING (
CREATE TABLE IF NOT EXISTS channel_connections (
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
chatbot_id UUID NOT NULL REFERENCES chatbots(id) ON DELETE CASCADE,
channel VARCHAR(20) NOT NULL CHECK (channel IN ('telegram', 'whatsapp')),
channel VARCHAR(20) NOT NULL CHECK (channel IN ('telegram')),
bot_token TEXT,
bot_username TEXT,
wa_keyword VARCHAR(50),
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMPTZ DEFAULT NOW(),
UNIQUE(chatbot_id, channel)
);
CREATE INDEX IF NOT EXISTS idx_channel_connections_chatbot ON channel_connections(chatbot_id);
CREATE INDEX IF NOT EXISTS idx_channel_connections_wa_keyword ON channel_connections(wa_keyword) WHERE channel = 'whatsapp';
ALTER TABLE channel_connections ENABLE ROW LEVEL SECURITY;
CREATE POLICY "channel_connections_owner" ON channel_connections FOR ALL USING (
chatbot_id IN (