configuration PK: id 9 required 1 unique

Description

A frequently asked question entry displayed in the mobile app's FAQ screen, scoped per organization with support for categorization and ordering.

10
Attributes
3
Indexes
5
Validation Rules
5
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
organization_id uuid Organization this FAQ entry belongs to. NULL indicates a platform-wide default entry visible to all organizations.
-
category string Grouping label for the FAQ entry (e.g. 'Activity Registration', 'Expenses', 'Account'). Used for section headers in FaqScreen.
required
question string The question text displayed as the FAQ item title.
required
answer text The full answer body. Supports plain text with optional markdown for bold/links.
required
sort_order integer Display order within the category. Lower values appear first.
required
is_active boolean Whether this entry is visible to end users. Inactive entries are hidden without deletion.
required
language_code string BCP-47 language code for the entry (e.g. 'nb', 'en'). Enables future localization.
required
created_at datetime Timestamp when the entry was created.
required
updated_at datetime Timestamp when the entry was last modified.
required

Database Indexes

idx_faq_entries_org_active
btree

Columns: organization_id, is_active

idx_faq_entries_org_category_sort
btree

Columns: organization_id, category, sort_order

idx_faq_entries_language
btree

Columns: language_code

Validation Rules

question_not_empty error

Validation failed

answer_not_empty error

Validation failed

valid_language_code error

Validation failed

valid_organization_reference error

Validation failed

sort_order_non_negative error

Validation failed

Business Rules

org_scoped_or_global
always

An FAQ entry with organization_id=NULL is a platform default visible to all organizations. An entry with a specific organization_id is visible only to that org. Org-specific entries take precedence over platform defaults for the same category/question slot.

Enforced by: FaqRepository
inactive_entries_hidden
always

Entries with is_active=false must never be returned to the mobile client. They are soft-deleted configuration entries retained for audit purposes.

Enforced by: FaqRepositoryFaqScreen
sort_order_within_category
on_create

sort_order is scoped to a (organization_id, category) partition. When a new entry is added without an explicit sort_order it is appended at the end of its category.

Enforced by: FaqRepository

CRUD Operations

create allowed
read allowed
update allowed
delete allowed

Storage Configuration

Storage Type
lookup_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage