Skip to Content
Trips Enjoy
Data Model (ERD)Domains

Applications

Tables and relationships for the applications domain.

Part of the data model; conventions and base columns are documented there.

applications

(Base +) FR-ONB-01 to FR-ONB-09

ColumnTypeNotes
applicant_user_idBIGINT FK users
type_idBIGINT FK lookupsapplication_type: organization, platform_driver, platform_photographer
status_idBIGINT FK lookupsapplication_status: draft, submitted, pending_review, changes_requested, approved, rejected, appealed, closed
country_codeCHAR(2) FK countries
requested_plan_idBIGINT FK plansChosen at registration, no charge (D-77)
payloadJSONBRole-specific fields (legal names, CR and tax numbers, license, vehicle, rates, service regions)
submitted_atTIMESTAMPTZ
review_due_atTIMESTAMPTZ2 working days (FR-ONB-03)
changes_due_atTIMESTAMPTZ14 days, plus one 7-day extension (D-235)
extension_usedBOOLEAN
decided_atTIMESTAMPTZ
reapply_afterDATEDecision date plus 30 days (BRL-06)
previous_application_idBIGINT FK applicationsRe-application chain

application_documents (Base +): application_id FK, doc_type_id FK lookups (document_type: id_card, driving_license, vehicle_registration, insurance, lab_result, commercial_registration, tax_certificate, portfolio_photo, other), storage_path TEXT (restricted bucket, DAT-04), mime_type VARCHAR(80), size_bytes BIGINT (10 MB documents, 25 MB photos, D-80, D-81), valid_until DATE NULL, issued_on DATE NULL, check_status_id FK lookups (document_check: pending, accepted, rejected).

application_decisions (Base +): application_id FK, decision_id FK lookups (application_decision: approve, request_changes, reject, close, uphold_appeal, overturn), reason_id FK lookups (decision_reason, D-234) NULL, message JSONB (in the applicant's language), items JSONB (requested changes), decided_by BIGINT FK users.

appeals (Base +) D-237: application_id FK UNIQUE, statement TEXT, files JSONB (up to 5), submitted_at, due_at (5 working days), status_id FK lookups (appeal_status: submitted, upheld, rejected).

On this page