Skip to content

Schema: attendant

Part of the generated database reference.

attendant_agent_status

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
agent_id UUID no β€” β€” β€”
status VARCHAR(255) no 'offline' β€” β€”
status_message VARCHAR(255) yes β€” β€” β€”
current_sessions INTEGER no 0 β€” β€”
max_sessions INTEGER no 5 β€” β€”
last_activity_at TIMESTAMPTZ no NOW() β€” β€”
break_started_at TIMESTAMPTZ yes β€” β€” β€”
break_reason VARCHAR(255) yes β€” β€” β€”
available_since TIMESTAMPTZ yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

attendant_attachments

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.75-attendant-attachments
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
session_id UUID no β€” FK attendant_sessions.id
name VARCHAR(255) no β€” β€” β€”
content_type VARCHAR(100) no 'application/octet-stream' β€” β€”
size_bytes BIGINT no 0 β€” β€”
data BYTEA no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

attendant_canned_responses

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
title VARCHAR(255) no β€” β€” β€”
content TEXT no β€” β€” β€”
shortcut VARCHAR(255) yes β€” β€” β€”
category VARCHAR(255) yes β€” β€” β€”
queue_id UUID yes β€” FK attendant_queues.id
is_active BOOLEAN no TRUE β€” β€”
usage_count INTEGER no 0 β€” β€”
created_by UUID yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

attendant_queue_agents

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
queue_id UUID no β€” FK attendant_queues.id
agent_id UUID no β€” β€” β€”
max_concurrent INTEGER no 3 β€” β€”
priority INTEGER no 0 β€” β€”
skills TEXT[] no '{}' β€” β€”
is_active BOOLEAN no TRUE β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

attendant_queues

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
name VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
priority INTEGER no 0 β€” β€”
max_wait_minutes INTEGER no 30 β€” β€”
auto_assign BOOLEAN no TRUE β€” β€”
working_hours JSONB no '{}' β€” β€”
is_active BOOLEAN no TRUE β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

attendant_session_messages

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
session_id UUID no β€” FK attendant_sessions.id
sender_type VARCHAR(255) no β€” β€” β€”
sender_id UUID yes β€” β€” β€”
sender_name VARCHAR(255) yes β€” β€” β€”
content TEXT no β€” β€” β€”
content_type VARCHAR(255) no 'text' β€” β€”
attachments JSONB no '[]' β€” β€”
is_internal BOOLEAN no FALSE β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

attendant_session_wrap_up

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
session_id UUID no β€” FK attendant_sessions.id
wrap_up_code_id UUID yes β€” FK attendant_wrap_up_codes.id
notes TEXT yes β€” β€” β€”
follow_up_required BOOLEAN no FALSE β€” β€”
follow_up_date VARCHAR(255) yes β€” β€” β€”
created_by UUID yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

attendant_sessions

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
session_number VARCHAR(255) no β€” β€” β€”
channel VARCHAR(255) no β€” β€” β€”
customer_id UUID yes β€” β€” β€”
customer_name VARCHAR(255) yes β€” β€” β€”
customer_email VARCHAR(255) yes β€” β€” β€”
customer_phone VARCHAR(255) yes β€” β€” β€”
status VARCHAR(255) no 'waiting' β€” β€”
priority INTEGER no 0 β€” β€”
agent_id UUID yes β€” β€” β€”
queue_id UUID yes β€” FK attendant_queues.id
subject VARCHAR(255) yes β€” β€” β€”
initial_message TEXT yes β€” β€” β€”
started_at TIMESTAMPTZ no NOW() β€” β€”
assigned_at TIMESTAMPTZ yes β€” β€” β€”
first_response_at TIMESTAMPTZ yes β€” β€” β€”
ended_at TIMESTAMPTZ yes β€” β€” β€”
wait_time_seconds INTEGER yes β€” β€” β€”
handle_time_seconds INTEGER yes β€” β€” β€”
satisfaction_rating INTEGER yes β€” β€” β€”
satisfaction_comment TEXT yes β€” β€” β€”
tags TEXT[] no '{}' β€” β€”
metadata JSONB no '{}' β€” β€”
notes TEXT yes β€” β€” β€”
transfer_count INTEGER no 0 β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

attendant_tags

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
name VARCHAR(255) no β€” β€” β€”
color VARCHAR(255) yes β€” β€” β€”
description TEXT yes β€” β€” β€”
is_active BOOLEAN no TRUE β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

attendant_transfers

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
session_id UUID no β€” FK attendant_sessions.id
from_agent_id UUID yes β€” β€” β€”
to_agent_id UUID yes β€” β€” β€”
to_queue_id UUID yes β€” FK attendant_queues.id
reason VARCHAR(255) yes β€” β€” β€”
notes TEXT yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

attendant_wrap_up_codes

  • Domain: attendant Β· Feature gate: #[cfg(feature = "attendant")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/attendant.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
org_id UUID no β€” FK organizations.org_id
bot_id UUID no β€” β€” β€”
code VARCHAR(255) no β€” β€” β€”
name VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
requires_notes BOOLEAN no FALSE β€” β€”
is_active BOOLEAN no TRUE β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id