Skip to main content
Version: v1 (Current)

Data models

Schema reference scope​

This guide maps the current model families, ownership and selected relationships. It is not a migration dump, complete database schema, API field allowlist or authorization policy. Read the current model, migrations, serializer/controller and module guide together before adding or exposing a field.

The retained static index records named classes and relationship-constructor calls from app/Models without booting Laravel or connecting to a database. It deliberately does not resolve imported aliases, inherited/trait methods, dynamic targets, query conditions or runtime scopes. An absent constructor in that index does not prove a relationship is absent; aliases and helper methods can delegate to another relation. Source commits/hashes and review evidence live in the documentation repository.

Overview​

Team/project context organizes many features, but not every model has a direct project_id, and a relationship is not a tenant-isolation policy. Some definitions/settings are team/global resources, some models are pivots or authentication identities, and some relationships are polymorphic or through another owner. For example, IntegrationToken supports an explicit is_global flag and corresponding scoped-query behavior; a missing team/project foreign key is not a universal definition of global access. Eager loading is chosen by each request/query; defining a relationship does not automatically prevent N+1 queries.

FamilyCurrent starting pointsBehavior and acceptance guide
Platform identity and accessAdmin, Team, Membership, Role, Permission, model permission/role pivotsAuthentication, authorization
Project compositionProject, reusable plugin definitions/versions, project pages/portals/dashboardsEcosystem, project resources (repository reference: ../../developer-tools/getting-started/project-resources.md)
Attendee dataAttendee, types, fields/order/sections, groups/memberships, credentialsAttendee registration
Forms, surveys and quizzesProjectForm, sections/fields, specialized settings, responses, quiz attempts/answersSurvey, quizzing
CollectionsCollection, fields/sections/layouts, entries/assetsCollections
Agenda and accessAgendaItem, enrollment/location/type models, access points/readers/rules/scansAgenda (repository reference: ../../developer-tools/getting-started/agenda-and-enrollment.md), devices
Content and engagementSocial streams/posts, games/sessions/point transactions, journeysSocial streams, games
Messaging and notificationChat rooms/sessions/participants/messages, templates/versions, delivery logsChat, notifications
AI, media and workflowsInterfaces/models/prompts/sessions, media events/assets, workflow versions/executions/stepsAI drivers, Gemini Live, automation (repository reference: ../../developer-tools/getting-started/communication-and-ai.md)
Import, export and integrationsImport rows/cells/raw data/errors, export logs/downloads/grants, integration tokensImporter, exporter, integrations
Supporting platform resourcesSubscriptions/items/coupons, assets, tags, saved searches, webhook delivery, audit/event recordsBilling, module index, auditing

Core platform​

Arrows name selected source relationships, not enforced database cardinality or complete access paths.

  • Admin extends Laravel’s authenticatable base; it is the platform admin identity. Attendee is a distinct authenticatable model. Do not substitute an assumed application User model for either context.
  • Team::admins() uses Membership and its team_admin pivot table. Current team, team ownership and membership are different relations/attributes; the team context is not a complete permission grant.
  • Role::permissions() uses role_has_permissions; model role/permission assignments use ModelHasRole and ModelHasPermission morph pivots. Roles carry team/guard-group context. Assignments identify a polymorphic model and can carry project scope; direct permission assignments also carry team context. Guard grouping uses the current guard_group_name contract. Inspect effective resolution rather than treating the Team→Role arrow as the complete assignment rule.
  • Project::team() is a direct belongs-to relation. Project dates are starting_at and ending_at; consult its validation rules and casts instead of copying the old starts_at/ends_at diagram.
  • Project permissions, global definitions and system actions require their actual context. The default Developer role (repository reference: ../../developer-tools/getting-started/permissions-and-dependencies.md) does not grant every project mutation.

HasTeams provides admin membership/current-team behavior. It is not a universal Eloquent global tenant scope. Middleware, policies, service lookups and endpoint constraints remain separate. See architecture context boundaries.

Attendee domain​

Model/methodDeclared relationship
Attendee::project, attendeeTypeBelongs to Project and AttendeeType.
Attendee::groupsMany-to-many Group using AttendeeGroupMembership; pivot includes role, custom sort order and metadata/timestamps.
Attendee::credentialsHas many AttendeeCredential.
Attendee::formResponses, quizAttemptsHas many recorded responses and attempts; workflow authorization is separate.
Attendee::agendaEnrollments, enrolledAgendaItemsEnrollment records and many-to-many agenda items.
Attendee::assets, encryptedValuesAttendeeAsset and AttendeeEncryptedValue records.
AttendeeType::attendeesHas many Attendee.
Group::attendeesMany-to-many Attendee; Group also links project, permission rules and optional saved search.
AttendeeCredential::attendee, credentialType, projectDirect owning attendee/type/project relations.
AttendeeCredential::attendeeCredentialScans, printJobsScans and polymorphic print jobs.
AttendeeCredentialType::badgeTemplateSelected BadgeTemplate association.

Profile fields can live in attendee_fields JSON with model accessors; a displayed first name/email is not necessarily a standalone column. The model’s hidden declaration covers the raw JSON and selected authentication-secret fields by default, while specific API/serializer paths can expose allowed projections. A $hidden declaration is not a substitute for field-level endpoint permissions, and an accessor is not an API write contract.

Field definitions and ordering use AttendeeField, AttendeeFieldTranslation, AttendeeTypeFieldSection and AttendeeFieldOrder. Inspect type/field configuration and actual import/update rules before writing dynamic values. Group membership and its cached permission evaluation have lifecycle/invalidation behavior; bulk/query-builder writes may bypass the expected model path. Do not infer a refreshed permission/audience result from an arbitrary pivot-table update.

Identity and credential lifecycle are distinct from registration, login, check-in and enrollment. Use the corresponding module operation rather than treating a relation assignment as the whole workflow.

Forms and content​

ProjectForm owns sections(), fields(), responses() and registration-related configuration, and can reference a PluginPage/PluginPageVersion. Relational FormSection can contain child sections and fields; FormField belongs to its form and section.

For graph-backed layouts, ProjectForm stores separately cast root_config, cards_config and elements_config, with layoutGraph() exposing root/cards/elements. Raw graph columns are hidden from normal serialization; an owning controller can provide form_definition. Admin/Project/ProjectFormController::show chooses native layout through usesLayoutEngine()/layoutGraph(), or calls FormSchemaTranslatorService::translateV1ToV2 unless a locked template supplies the definition. Use that service’s section/field conversion and the actual response/write service as the starting point for graph-to-relational ID mapping; no universal identity mapping is implied. An Eloquent read does not automatically migrate every form to one format.

Specialized forms and recorded answers​

  • SurveySettings and QuizSettings extend ProjectForm and use project_forms, with specialized JSON-backed settings accessors. They are not each a separate form table.
  • FormSection carries quiz-bank settings in custom_settings; quizQuestions() filters its fields by the quiz-question flag. Bank grouping, active/live state and scoring still belong to the quiz service/API contract.
  • QuizQuestionSettings is a separate model with project_form_id, element_id and scoring/correct-answer settings. Its projectForm() and quizSettings() relations use the form identity; do not assume a physical question row for every graph element.
  • QuizAttempt links form, attendee, optional game/live/section contexts and answers(). QuizAttemptAnswer records attempt answers. A form response and a scored quiz attempt are different records/workflows.
  • AttendeeFormResponse links project/form, optional attendee, response values and a polymorphic subject. Its fields include metadata/attribution and visitor/session context. A nullable attendee relation alone does not establish complete anonymity or define which response fields a public API may return.
  • AttendeeFormResponseValue belongs to a response and FormField. Inspect the version-specific response mapping and service before interpreting graph element IDs as relational field IDs.

Use forms/surveys, registration, quizzing and the actual portal API schema. A client-rendered required field, submit button or results setting does not enforce server validation or privacy.

Portal and plugins​

ModelSelected relationships and role
PluginPageDefinition: team, variants, versions, current/active versions, Git repository, development/planning sessions and installed project pages.
PluginPageVariantDefinition ownership and default/develop/production/scoped version lookup; names alone do not establish publication state.
PluginPageVersionPluginPage, variant, build artifact, assets and project installations.
GitRepositoryPlugin page/theme owner, collaborators, build artifacts and pull requests.
GitBuildArtifactRepository and optional PluginPageVersion linkage. Build success does not imply installation.
ProjectPageProject-level app installation with PluginPage and version relations.
ProjectPortalProject, domains, content links, theme/version, widgets and authentication-method associations.
ProjectPortalPagePortal content link; projectPage() and model() are named polymorphic accessors over the same model_type/model_id pair, not independent stored associations.
ProjectPortalDomainPortal-domain mapping; use the custom-domain workflow for actual routing/TLS availability.
ProjectPortalWidgetPortal widget attachment, separate from the reusable widget definition/version.
ProjectDashboard, DashboardTileDashboard and installed tile context, separate from PluginTile/PluginTileVersion.
PluginPlanTeam/template/build/planning relationships and reusable provisioning configuration.

Themes, widgets, tiles and external apps have their own definition/version/asset models. App variants/builds do not imply identical release behavior for all types. Bind the installed version, named dependencies and portal content/access rules explicitly; a model relation or installed portal-page API key is not an unlimited attendee authorization grant. Page keys provide supported runtime/API context; see API keys for credential boundaries.

Use portal architecture, developer workflow, app configuration (repository reference: ../../developer-tools/getting-started/app-configuration.md), custom domains and App Store.

Collections​

Collection owns project-scoped fieldDefinitions(), sections(), formLayouts(), entries() and assets(). The corresponding models include CollectionFieldDefinition, CollectionSection, CollectionSectionField, CollectionFormLayout, CollectionEntry and CollectionAsset.

CollectionEntry belongs to its collection and project, casts data to an array, and has a polymorphic submittedBy() relation. A polymorphic submitter is not guaranteed to be an attendee. Schema definitions, entry JSON, form layout, visibility/tags and API import/export behavior are separate contracts. Use Collections and validate actual field identifiers/data shapes and allowed submitter/resource access before creating entries.

Access, agenda and security​

Model/methodOwnership or related records
AgendaItemProject, type, locations, access zones, enrollments and speaker group.
AgendaItemEnrollmentAgenda item, attendee, optional location/credential and enrolling admin.
AccessPointProject/location with readers, rules, statuses and credential scans.
AccessPointReaderProject, point/zone, reader OTPs, scans, location and access-code logs.
AttendeeCredentialScanAccess point, reader, credential, attendee, agenda item and access status.
BadgeTemplateProject/team, current/latest/version records and credential types.
BadgeTemplateVersionTemplate, publisher and assets.
PrintJob, PrintAuditLogPrint workflow records; inspect polymorphic printable context, device delivery and audit behavior.

An enrollment, a credential scan and an event check-in are distinct mutations. Capacity, location, validity, reader authentication and denied access belong to their services/policies. Creating a PrintJob does not prove a physical badge printed. Follow agenda/enrollment (repository reference: ../../developer-tools/getting-started/agenda-and-enrollment.md), access control, devices and badge printing.

Engagement and gamification​

SocialStream belongs to a project and owns posts. SocialStreamPost relates to its stream, attendee, polymorphic approver, tagged attendees and moderation logs; it reaches Project through the stream. Interpret the post’s actual status/assets/visibility with the social-stream contract, rather than assuming every record is publicly approved.

Game relates to project, attendees, groups, point rules, sessions and transactions. GameSession links game/attendee and point transactions. GameScore, GamePointRule, GameGroup, JourneyTemplate and JourneyProgress are additional feature models. A point transaction, score projection and completed journey are different facts; use the supported scoring/aggregation workflow. Like is a distinct model, not a universal bookmark abstraction for every resource.

See games and the feature’s actual scoring/privacy/leaderboard acceptance cases. Model presence does not establish every UI/game mode or hardware interaction.

Notifications and communications​

NotificationTemplate can be associated with project/team, test group, versions, current/latest versions and assets. EmailSendConfiguration, NotificationEvent, AttendeeNotificationLog, EmailLog, SmsMessageLog, PushBroadcast, PushNotificationLog and PushSubscription support configured delivery/audit contexts. A queued/logged notification is not proof of provider delivery or attendee receipt; use notifications.

Chat is session-based: ChatRoom owns sessions/waitlist and can reference an AI interface; ChatRoomSession owns participants/messages/call metrics and can reference MediaSession. ChatMessage stores a room-session and sender-participant identity. Attachments/reactions and moderation flags have their own records/fields. Do not substitute a room ID for the session/participant contract. Use group chat and messaging.

Admin workflows, AI and media​

AdminWorkflow relates to versions, a published version, steps/triggers, assets, team/project, owner/test group and execution records. Its legacy executions() targets StoredWorkflow, while workflowExecutions() targets AdminWorkflowExecution. The run record is AdminWorkflowExecution; AdminWorkflowStepInvocation links a logical step invocation to it, and AdminWorkflowStepAttempt links an attempt to the invocation. AdminWorkflowBatchManifest and AdminWorkflowBatchMember hold batch context; the execution/manifest correlation is not universally a migration-enforced foreign key. Distinguish these from definition/version and external delivery. Use the automation run guide and action reference.

AiInterface belongs to project and relates to AiPrompt, SystemAiModel and sessions. AiSession links interface, attendee, messages, optional workflow-step invocation and MediaSession; its project relation is through the interface. AdminAiSession/AdminAiSessionMessage are separate admin-facing conversation models. System/model/provider configuration and credential scoping are separate from a conversation’s persisted messages.

MediaSession owns participants, events and assets, and can link AI sessions and a ChatRoomSession. Transcription/event/asset metadata is not proof that audio was stored, callback authentication succeeded or a file is usable. Use AI configuration, AI drivers, Gemini Live, and communication/automation setup (repository reference: ../../developer-tools/getting-started/communication-and-ai.md).

Import, export and sync​

Import has project/team, polymorphic owner/reviewer, rows, cells, raw data, job errors and optional IntegrationToken. Use ImportRow, ImportCell, ImportRawData and ImportJobError with the current stage/run/chunk contract. Importable model rules and the staged importer determine validation and duplicate matching; a static diagram of generic log/mapping tables is not that contract.

ExportLog relates to admin/team/project, downloads and workflow recipient grants. AttendeeExportLog/AttendeeExportLogDownload provide a separate attendee export context. Authorization for generated files and download grants must be tested; an export log is not a public URL or completed file-delivery guarantee.

IntegrationToken can relate to admin/project/team/social stream. Its credentials field uses an encrypted-array cast and sensitive values are hidden from serialization; this does not make every API projection/config/log safe automatically. Server integrations use IntegrationToken::credential($key) for encrypted secrets and configValue($key) for non-secret configuration. Do not copy their secret results into docs or client bundles.

The sync registry/builders, request/context DTOs and jobs live outside a universal SyncProvider model. Inspect the sync architecture, importer, exporter and integration guide for actual persistence and retry/ownership behavior. Do not infer a bidirectional mapping table or identical lifecycle for every adapter.

Key Eloquent traits and serialization​

Trait/patternRead it as
HasTeamsMembership/current-team operations on supported identities; not a universal tenant scope.
CacheableConfigured cache lookup/invalidation behavior where used; not automatic caching of every model or write path.
AdvancedSearchableSaved-search/advanced-query behavior via the platform search service; distinct from Scout indexing.
HasAdvancedFiltersSupported query filtering with per-model/request constraints; not a permission grant.
HasRolesAndPermissionsSupported permission/role context and assignments; inspect scope and cache invalidation.
ImportableModel import configuration/lifecycle integration; not arbitrary file import support.
Uploadable, signed asset helpers and asset relationsStorage/URL behavior for supported resources; authorization and delivery remain separate.
AiModeratable, PluginProps, ObservableTraitSelected feature behavior where declared and invoked; no universal mutation/event guarantee.

Casts, fillable/guarded/hidden arrays, accessors and computed API projections describe different layers. A fillable property need not be accepted by an endpoint; a hidden property may have an explicitly allowed projection elsewhere. Check migrations for storage constraints and requests/controllers/policies for mutation and exposure rules. Avoid documenting every model as soft-deletable, directly project-owned or identically timestamped.

Observers, caches and safe changes​

Observers can be registered in providers, attributes or individual model boot methods. Inspect registration and the actual write path; not every observer is registered in EventServiceProvider, runs cache invalidation first, or queues heavy work. Raw/bulk/query-builder operations and custom pivot paths may bypass ordinary model hooks.

Before changing a relationship or field, trace the owning endpoint, database constraints, casts/accessors, serialization, events/observers, cache invalidation, import/export mappings and background jobs. Check the real service/cache contracts, event architecture, auditing and module acceptance cases.

SymptomInspect
A relation returns another project’s dataParent lookup, route/context constraints, policy and related-query scoping; the method name alone is not isolation.
A field is missing or has a different shapeStored column versus JSON accessor, casts, hidden fields, serializer projection and versioned schema.
Permissions/groups appear staleSupported membership/role mutation path and cache invalidation; compare direct/bulk writes.
Form/quiz IDs do not alignForm version, graph element versus relational field mapping, settings and response/attempt workflow.
Chat content is missing from a room queryRoom session and participant/message ownership, not just room identity.
A saved record did not trigger downstream workActual observer/event registration and dispatch path, queues and provider results.
A file/export/print record exists but output is absentStorage/URL/job status, authorization, provider/device delivery and final receipt.

Source and validation​

Reviewed at platform commit 3b48eb675f7c8e3c4f0b87d0cd613fa7fb371093, combining a static class/relationship index with direct inspection of the documented ownership, casts, settings inheritance, core pivots and trait boundaries. The indexer uses PHP tokenization in a network-disabled container, with synthetic fixtures checking comment/string exclusion, traits, polymorphic/dynamic targets and branch calls. It does not instantiate models, run SQL, prove migration foreign keys or certify all authorization/runtime paths.

The repository retains the static index, extractor, fixture/reproduction notes, source snapshot and review report. Module-specific backend persistence, allowed/denied queries, graph migrations, lifecycle/invalidation and output delivery remain environment acceptance checks. A strict docs build and static index are source evidence, not a deployed-database audit.