People Discovery Model
The people module stores profile interactions separately from friendships.
people_interactions
| Column | Type | Notes |
|---|---|---|
id | UUID PK | |
user_id | UUID | The actor |
target_profile_id | UUID | Profile being evaluated |
type | enum | like or dislike |
expires_at | timestamptz | Seven days after the latest save |
created_at, updated_at | timestamptz |
There is one row per actor/profile pair. Expired rows are not active for feed, incoming-like, or mutual-like behavior.
people_matches
| Column | Type | Notes |
|---|---|---|
id | UUID PK | |
user_a_id, user_b_id | UUID | Canonically ordered distinct users |
profile_a_id, profile_b_id | UUID | Matching profile IDs |
matched_at, created_at | timestamptz |
A unique pair constraint prevents duplicate matches. Mutual likes also ensure
a unique direct chat, but do not change the friendships table.
people_blocks
Stores unilateral discovery blocks as (user_id, blocked_user_id). Blocks are
unique per pair and remove the other user from discovery/search and interactions.
All three tables have RLS enabled and are accessed through the authenticated API service.