01 Software

Community

Community collection schemas — threads, comments, reactions, bookmarks, reports, bans

Community Collections

Community requires the community feature enabled. See Feature Setup.

Threads

FieldTypeDescription
titletextThread title (required)
slugtextAuto-generated from title
contentrichTextThread body (required)
customerrelationship → customersAuthor (auto-set from JWT)
categoriesrelationship → thread-categories (hasMany)Thread categories
commentsjoin → commentsReverse join of comments on this thread
thumbnailupload → imagesFeatured image
moderationStatusselectpending | approved | rejected | reported | hidden
isPinnedcheckboxAdmin-only, appears at top of listings
allowCommentscheckboxDefault: true
isFeaturedcheckboxFeatured flag
publishedAtdatePublish date
viewCountnumberRead-only, incremented via view endpoint
commentCountnumberRead-only, auto-updated by comment hooks
reactionCountnumberRead-only, auto-updated by reaction hooks
reportCountnumberRead-only, auto-updated by report hooks
metadatajsonArbitrary extension data

Access: Customer-scoped. Customers create/update own threads. Admins have full control.

Soft delete: Enabled. Cascading delete removes all comments, reactions, bookmarks, and reports.

Comments

FieldTypeDescription
threadrelationship → threadsParent thread (required)
customerrelationship → customersAuthor (required)
contenttextareaComment text, max 2000 chars (required)
parentrelationship → commentsParent comment for nesting
depthnumber0-2, auto-calculated from parent
rootIdtextFirst ancestor ID for thread tracking
statusselectpublished | hidden | reported
isEditedcheckboxAuto-set on update
reactionCountnumberRead-only
reportCountnumberRead-only
metadatajsonArbitrary extension data

Nesting: 3 levels max (depth 0, 1, 2). Cascading delete removes child comments and reactions.

Reactions

FieldTypeDescription
threadrelationship → threadsTarget thread (XOR with comment)
commentrelationship → commentsTarget comment (XOR with thread)
customerrelationship → customersReactor (required)
typerelationship → reaction-typesReaction type (required)

Uniqueness: One reaction per customer + target + type per tenant. Duplicate returns 409.

Reaction Types

FieldTypeDescription
titletextDisplay name (required)
slugtextAuto-generated
emojitextEmoji character
icontextIcon name/path

Access: Tenant-admin creates/manages. Public read. Orderable.

Bookmarks

FieldTypeDescription
threadrelationship → threadsBookmarked thread (required)
customerrelationship → customersOwner (required)

Access: Purely customer-scoped. One bookmark per customer + thread per tenant.

Thread Categories

FieldTypeDescription
titletextCategory name (required)
slugtextAuto-generated
descriptiontextareaShort description
imageupload → imagesCategory image
parentrelationship → thread-categoriesHierarchical parent
colortextColor picker value

Reports

FieldTypeDescription
targetrelationship → threadsReported thread (XOR with targetComment)
targetCommentrelationship → commentsReported comment (XOR with target)
customerrelationship → customersReporter (required)
reasonselectspam | harassment | inappropriate | off-topic | other
reasonDetailtextareaDetail text, max 500 chars

Auto-hide: When report count reaches 5, content is automatically hidden.

Community Bans

FieldTypeDescription
customerrelationship → customersBanned customer (required)
isPermanentcheckboxPermanent ban flag
bannedUntildateTemporary ban expiry
reasontextareaBan reason
bannedByrelationship → usersAdmin who issued ban

Access: Admin-only. Ban check runs on thread/comment creation — banned customers receive 403.

SDK Guide

For implementation examples, see Community Guide.

On this page