Intry

Data model

Core Prisma entities and critical field names for Intry.

Overview

The canonical schema lives in prisma/schema.prisma. IDs are UUIDs created by the database.

Hierarchy

Tenant (property management org)
 ├── Property (site / building)
 │    └── Unit (apartment or suite)
 │         ├── VirtualNumber (Twilio e164)
 │         ├── Call → Approval(s)
 │         └── Residents (User, many-to-many)
 ├── User (admins, PMs, staff, residents)
 │    └── Device (push tokens, platform)
 └── Subscription / billing (Stripe)

In product language, a Tenant is often called an organization or management company.

Entities (selected)

ModelPurpose
TenantTop-level B2B customer; owns properties, users, entitlements JSON, optional Stripe customer.
PropertyPhysical site; timezone default America/New_York.
UnitLeasable unit; unitLabel is the human-visible identifier (not number / name).
VirtualNumberTwilio number in E.164 (e164); optional quarantineUntil for pool hygiene.
UserSingle name field; roles include admin, property_manager, staff, resident. Links to Clerk / WorkOS where applicable.
DeviceMobile installation; use isEnabled (not enabled).
CallVoice session; startedAt, durationSec, finalState (completed, no-answer, busy, failed, timeout).
ApprovalResident decision; action is approve or deny (not past-tense enums).

Naming pitfalls

JSON entitlements (Tenant)

Tenant.entitlements can gate modules (e.g. documents, maintenance). null means all modules enabled for backward compatibility. See schema comments in Prisma for the current key set.

On this page