Schema: tickets
Part of the generated database reference.
support_tickets
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.33-tickets-itsm-unification
- Rust source:
botschema/src/tickets.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 |
β |
β |
β |
| ticket_number |
VARCHAR(255) |
no |
β |
β |
β |
| subject |
VARCHAR(255) |
no |
β |
β |
β |
| description |
TEXT |
yes |
β |
β |
β |
| status |
VARCHAR(255) |
no |
'open' |
β |
β |
| priority |
VARCHAR(255) |
no |
'medium' |
β |
β |
| category |
VARCHAR(255) |
yes |
β |
β |
β |
| source |
VARCHAR(255) |
no |
'web' |
β |
β |
| requester_id |
UUID |
yes |
β |
β |
β |
| requester_email |
VARCHAR(255) |
yes |
β |
β |
β |
| requester_name |
VARCHAR(255) |
yes |
β |
β |
β |
| assignee_id |
UUID |
yes |
β |
β |
β |
| team_id |
UUID |
yes |
β |
β |
β |
| due_date |
TIMESTAMPTZ |
yes |
β |
β |
β |
| first_response_at |
TIMESTAMPTZ |
yes |
β |
β |
β |
| resolved_at |
TIMESTAMPTZ |
yes |
β |
β |
β |
| closed_at |
TIMESTAMPTZ |
yes |
β |
β |
β |
| satisfaction_rating |
INTEGER |
yes |
β |
β |
β |
| tags |
TEXT[] |
no |
'{}' |
β |
β |
| custom_fields |
JSONB |
no |
'{}' |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
| record_type |
VARCHAR(50) |
no |
'ticket' |
β |
β |
Indexes: idx_unified_search_support_tickets(to_tsvector('english', COALESCE(subject::text, '')
ticket_canned_responses
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/tickets.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 |
β |
β |
β |
| category |
VARCHAR(255) |
yes |
β |
β |
β |
| shortcut |
VARCHAR(255) |
yes |
β |
β |
β |
| created_by |
UUID |
yes |
β |
β |
β |
| is_active |
BOOLEAN |
no |
TRUE |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
ticket_categories
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/tickets.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 |
β |
β |
β |
| parent_id |
UUID |
yes |
β |
FK |
ticket_categories.id |
| color |
VARCHAR(255) |
yes |
β |
β |
β |
| icon |
VARCHAR(255) |
yes |
β |
β |
β |
| sort_order |
INTEGER |
no |
0 |
β |
β |
| is_active |
BOOLEAN |
no |
TRUE |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/tickets.rs
| Column |
SQL type |
Null |
Default |
Key |
References |
| id |
UUID |
no |
gen_random_uuid() |
PK |
β |
| ticket_id |
UUID |
no |
β |
FK |
support_tickets.id |
| author_id |
UUID |
yes |
β |
β |
β |
| author_name |
VARCHAR(255) |
yes |
β |
β |
β |
| author_email |
VARCHAR(255) |
yes |
β |
β |
β |
| content |
TEXT |
no |
β |
β |
β |
| is_internal |
BOOLEAN |
no |
FALSE |
β |
β |
| attachments |
JSONB |
no |
'[]' |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
ticket_sla_policies
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/tickets.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 |
β |
β |
β |
| priority |
VARCHAR(255) |
no |
β |
β |
β |
| first_response_hours |
INTEGER |
no |
β |
β |
β |
| resolution_hours |
INTEGER |
no |
β |
β |
β |
| business_hours_only |
BOOLEAN |
no |
TRUE |
β |
β |
| is_active |
BOOLEAN |
no |
TRUE |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| updated_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |
- Domain:
tickets Β· Feature gate: #[cfg(feature = "tickets")] Β· Migration: 6.5.15.1-consolidated
- Rust source:
botschema/src/tickets.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 |
β |
β |
β |
| created_at |
TIMESTAMPTZ |
no |
NOW() |
β |
β |
| branch_id |
UUID |
yes |
β |
FK |
branches.id |