Skip to content

Schema: social

Part of the generated database reference.

social_announcements

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.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 β€” β€” β€”
author_id UUID no β€” β€” β€”
title VARCHAR(255) no β€” β€” β€”
content TEXT no β€” β€” β€”
priority VARCHAR(255) no 'normal' β€” β€”
target_audience JSONB no '{}' β€” β€”
is_pinned BOOLEAN no FALSE β€” β€”
requires_acknowledgment BOOLEAN no FALSE β€” β€”
acknowledged_by JSONB no '[]' β€” β€”
starts_at TIMESTAMPTZ yes β€” β€” β€”
ends_at TIMESTAMPTZ yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

social_bookmarks

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
user_id UUID no β€” β€” β€”
post_id UUID no β€” FK social_posts.id
created_at TIMESTAMPTZ no NOW() β€” β€”

social_channel_accounts

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

social_comments

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
post_id UUID no β€” FK social_posts.id
parent_comment_id UUID yes β€” FK social_comments.id
author_id UUID no β€” β€” β€”
content TEXT no β€” β€” β€”
mentions JSONB no '[]' β€” β€”
reaction_counts JSONB no '{}' β€” β€”
reply_count INTEGER no 0 β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
edited_at TIMESTAMPTZ yes β€” β€” β€”
deleted_at TIMESTAMPTZ yes β€” β€” β€”

social_communities

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.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 β€” β€” β€”
slug VARCHAR(255) no β€” β€” β€”
description TEXT yes β€” β€” β€”
cover_image TEXT yes β€” β€” β€”
icon TEXT yes β€” β€” β€”
visibility VARCHAR(255) no 'public' β€” β€”
join_policy VARCHAR(255) no 'open' β€” β€”
owner_id UUID no β€” β€” β€”
member_count INTEGER no 0 β€” β€”
post_count INTEGER no 0 β€” β€”
is_official BOOLEAN no FALSE β€” β€”
is_featured BOOLEAN no FALSE β€” β€”
settings JSONB no '{}' β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
archived_at TIMESTAMPTZ yes β€” β€” β€”
branch_id UUID yes β€” FK branches.id

social_community_members

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
community_id UUID no β€” FK social_communities.id
user_id UUID no β€” β€” β€”
role VARCHAR(255) no 'member' β€” β€”
notifications_enabled BOOLEAN no TRUE β€” β€”
joined_at TIMESTAMPTZ no NOW() β€” β€”
last_seen_at TIMESTAMPTZ yes β€” β€” β€”

social_hashtags

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.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 β€” β€” β€”
tag VARCHAR(255) no β€” β€” β€”
post_count INTEGER no 0 β€” β€”
last_used_at TIMESTAMPTZ no NOW() β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

social_poll_options

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
poll_id UUID no β€” FK social_polls.id
text VARCHAR(255) no β€” β€” β€”
vote_count INTEGER no 0 β€” β€”
position INTEGER no 0 β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

social_poll_votes

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
poll_id UUID no β€” FK social_polls.id
option_id UUID no β€” FK social_poll_options.id
user_id UUID no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

social_polls

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
post_id UUID no β€” FK social_posts.id
question TEXT no β€” β€” β€”
allow_multiple BOOLEAN no FALSE β€” β€”
allow_add_options BOOLEAN no FALSE β€” β€”
anonymous BOOLEAN no FALSE β€” β€”
total_votes INTEGER no 0 β€” β€”
ends_at TIMESTAMPTZ yes β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”

social_posts

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.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 β€” β€” β€”
author_id UUID no β€” β€” β€”
community_id UUID yes β€” FK social_communities.id
parent_id UUID yes β€” FK social_posts.id
content TEXT no β€” β€” β€”
content_type VARCHAR(255) no 'text' β€” β€”
attachments JSONB no '[]' β€” β€”
mentions JSONB no '[]' β€” β€”
hashtags VARCHAR(255) no '{}' β€” β€”
visibility VARCHAR(255) no 'public' β€” β€”
is_announcement BOOLEAN no FALSE β€” β€”
is_pinned BOOLEAN no FALSE β€” β€”
poll_id UUID yes β€” β€” β€”
reaction_counts JSONB no '{}' β€” β€”
comment_count INTEGER no 0 β€” β€”
share_count INTEGER no 0 β€” β€”
view_count INTEGER no 0 β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”
updated_at TIMESTAMPTZ no NOW() β€” β€”
edited_at TIMESTAMPTZ yes β€” β€” β€”
deleted_at TIMESTAMPTZ yes β€” β€” β€”
branch_id UUID yes β€” FK branches.id

social_praises

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.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 β€” β€” β€”
from_user_id UUID no β€” β€” β€”
to_user_id UUID no β€” β€” β€”
badge_type VARCHAR(255) no β€” β€” β€”
message TEXT yes β€” β€” β€”
is_public BOOLEAN no FALSE β€” β€”
post_id UUID yes β€” FK social_posts.id
created_at TIMESTAMPTZ no NOW() β€” β€”
branch_id UUID yes β€” FK branches.id

social_reactions

  • Domain: social Β· Feature gate: #[cfg(feature = "social")] Β· Migration: 6.5.15.1-consolidated
  • Rust source: botschema/src/social.rs
Column SQL type Null Default Key References
id UUID no gen_random_uuid() PK β€”
post_id UUID yes β€” FK social_posts.id
comment_id UUID yes β€” FK social_comments.id
user_id UUID no β€” β€” β€”
reaction_type VARCHAR(255) no β€” β€” β€”
created_at TIMESTAMPTZ no NOW() β€” β€”