Skip to Content
Trips Enjoy
Software (SRS)

Data Requirements

Core entities, isolation, soft delete and retention.

6.1 Core entities

ERD holds the tables, columns, keys, lookup types and RLS paths. This table states each entity's purpose, owner scope and retention. Scope means who owns the rows: tenant (one organization), platform, account (one person) or supplier.

EntityPurposeScopeERD tablesRetention
Account and rolesLogin identity and held rolesAccountusers, user_roles, auth_factors, sessions, devicesUntil deletion, then section 6.4
MarketCountry configurationPlatformmarkets, market_payment_methods, tax_ratesLife of platform
OrganizationTenant root and settingsTenantorganizationsLife of tenant, then financial retention
Member and permissionsStaff access per organizationTenantorganization_members, member_permissions, invitationsKept with audit log
ApplicationOrganization and supplier applicationsPlatformapplications, application_documents, application_decisions, appeals[OPEN: rejected applications and documents]
Supplier profilesDriver and photographer detailsPlatform, or tenant for organization-owneddriver_profiles, photographer_profiles, provider_vehicles, portfolio_items, availability_slotsLife of account
Lab testDriver lab-test recordPlatformlab_tests, lab_partnersPer market legal review
Vehicle type and vehicleSeat layouts and fleetTenantvehicle_types, vehicle_type_seats, vehiclesLife of tenant
TripOne organized trip with stops, audience, vehicles and staffTenanttrips, trip_stops, trip_audiences, trip_vehicles, trip_staff_assignments5 years after account deletion
ProgramActivities and tiersTenantprograms, program_tiersAs trip
BookingReservation, passengers, programs, seats, remediesTenant and travelerbookings, booking_passengers, booking_programs, trip_seats, booking_remedies7 years (financial)
DealNegotiation and offersTenant and supplierdeals, deal_offers7 years (financial)
Payment and refundGateway payments, attempts, refundsTenant or accountpayments, payment_attempts, refunds7 years
CouponCodes, scope, redemptions, flagsCreator scopecoupons, coupon_programs, coupon_audiences, coupon_redemptions, abuse_flagsRedemptions 7 years
Plan and subscriptionCatalog, prices, subscriptions, charges, overrides, countersPlatform and ownerplans, plan_limits, plan_prices, subscriptions, subscription_charges, plan_overrides, usage_countersCharges 7 years
Check-in and trackingBoarding events, positions, incidents, reportsTenantcheckin_events, tracking_points, incidents, trip_reportsCheck-in 1 year; GPS 90 days
Child link and safety caseParent links and safety casesParent and tenantchild_links, safety_casesChild trip history 1 year
Album and photoTrip media and accessPhotographer and tripalbums, photos, album_shared_links, album_members, download_logsAlbums until deleted; download logs 1 year
LedgerDouble-entry recordPlatform and tenantledger_accounts, ledger_transactions, ledger_entries7 years
InvoiceB2C, B2B and credit notes for all partiesIssuerinvoices, invoice_lines7 years
Payout and settlementWeekly runs and per-trip settlementsSupplier, tenantpayout_runs, payouts, payout_methods, settlements, settlement_lines7 years
ReconciliationGateway differencesPlatformreconciliation_exceptions7 years
DisputeDisputes and filesPlatformdisputes, dispute_files7 years
NotificationPreferences, messages, deliveries, templatesAccount and platformnotification_preferences, notifications, notification_deliveries, notification_templatesDelivery logs [OPEN]
AnalyticsEvents and daily rollupsTenant and platformanalytics_events, analytics_dailyEvents 13 months (proposed); rollups life of tenant
Consent and privacyConsents and data requestsAccountconsents, privacy_requestsLife of account plus 7 years (proposed)
AuditAdmin actions and permission changesPlatformaudit_logs7 years

6.2 Data isolation

IDRequirementPriority
DAT-01Every tenant row carries organization_id. Reads and writes are limited to the tenant at the database (RLS), repository and API layers.Must
DAT-02No user-facing query joins across tenants. Platform-wide reads run under the admin or platform repository and are logged.Must
DAT-03When deletion becomes permanent, personal fields are removed or replaced with "Deleted user", except records kept under section 6.4. Trip records stay 5 years. Future bookings are cancelled and refunded; remaining earnings are paid on the next payout date.Must
DAT-04Identity documents and lab results are in a restricted bucket visible only to admins; every open is audited.Must
DAT-05Phone numbers, ID and license numbers, and payout details are encrypted at column level.Must
DAT-06Money is stored as minor units plus currency code; rounding follows FR-MKT-05.Must
DAT-10Every API and file path uses the public UUID; internal numeric IDs never leave the backend.Must

6.3 Soft delete, immutability and deletion

IDRequirementPriority
DAT-07Suspended accounts, cancelled bookings and withdrawn applications are soft-deleted or kept, hidden from user views and visible to admins.Must
DAT-08Ledger, audit, deal offer, check-in, tracking, consent and outbox rows are insert-only. Corrections are reversing rows.Must
DAT-09A deleted account keeps its trip and financial records for the periods in 6.4, with personal fields removed where the law allows.Must

6.4 Retention

DataRetentionBasis
Account during deletion grace30 days; sign-in restoresBRL-15
Account personal data after deletionRemoved, except records belowBRL-15
Trip records5 years after account deletionBRL-15
Bookings, payments, invoices, ledger, payouts, deals7 yearsOD-04 (pending legal review)
Audit log7 years, object-lockedD-04, BRD 8.5
Check-in and check-out events1 yearD-45
Raw GPS points90 days, then an hourly summary is keptArchitecture 18.4
Child trip history1 yearD-135
Album download logs1 yearD-271
Verification codes5 minutesBRL-20
Idempotency keys24 hoursNFR-SEC-06
Identity documents and lab results[OPEN: per market legal review]BRD 8.2
Notification delivery logs[OPEN]Not set
Application logs7 years in archive storageArchitecture 22.1
Database backupsDaily snapshots 35 days; point-in-time 7 days; cross-region copies 30 daysArchitecture 22.1

On this page