masil
Tables (17)
affinity_histories
- id — BIGINT — Primary key — NOT NULL
- pet_id — BIGINT — Foreign key → pets.id — NOT NULL
- interaction_event_id — BIGINT — Foreign key → interaction_events.id
- score_before — INT — NOT NULL
- score_after — INT — NOT NULL
- score_delta — INT — NOT NULL
- reason — VARCHAR(100) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
auth_sessions
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — VARCHAR(255) — NOT NULL
- refresh_token_hash — VARCHAR(255) — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- revoked_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
auth_verifications
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- purpose — VARCHAR(30) — NOT NULL
- code_hash — VARCHAR(255) — NOT NULL
- attempt_count — INT — NOT NULL
- expires_at — TIMESTAMP — NOT NULL
- verified_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
interaction_events
- id — BIGINT — Primary key — NOT NULL
- event_id — VARCHAR(100) — NOT NULL
- robot_pairing_id — BIGINT — Foreign key → robot_pairings.id — NOT NULL
- event_type — VARCHAR(50) — NOT NULL
- metadata — JSON
- occurred_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
notifications
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- notification_type — VARCHAR(50) — NOT NULL
- title — VARCHAR(200) — NOT NULL
- body — VARCHAR(1000) — NOT NULL
- data — JSON
- read_at — TIMESTAMP
- created_at — TIMESTAMP — NOT NULL
pet_affinity_states
- pet_id — BIGINT — Foreign key → pets.id — NOT NULL
- affinity_score — INT — NOT NULL
- affinity_level — INT — NOT NULL
- mood — VARCHAR(30) — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
pets
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- name — VARCHAR(100) — NOT NULL
- profile_image_key — VARCHAR(500)
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- deleted_at — TIMESTAMP
push_tokens
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- device_id — VARCHAR(255) — NOT NULL
- platform — VARCHAR(20) — NOT NULL
- token — VARCHAR(500) — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
robot_credentials
- robot_id — BIGINT — Foreign key → robots.id — NOT NULL
- device_token_hash — VARCHAR(255) — NOT NULL
- expires_at — TIMESTAMP
- rotated_at — TIMESTAMP
robot_current_states
- robot_id — BIGINT — Foreign key → robots.id — NOT NULL
- online — BOOLEAN — NOT NULL
- mode — VARCHAR(30) — NOT NULL
- battery_level — INT — NOT NULL
- docked — BOOLEAN — NOT NULL
- last_seen_at — TIMESTAMP
- updated_at — TIMESTAMP — NOT NULL
robot_pairings
- id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.id — NOT NULL
- pet_id — BIGINT — Foreign key → pets.id — NOT NULL
- robot_id — BIGINT — Foreign key → robots.id — NOT NULL
- paired_at — TIMESTAMP — NOT NULL
- unpaired_at — TIMESTAMP
robots
- id — BIGINT — Primary key — NOT NULL
- serial_number — VARCHAR(100) — NOT NULL
- model_name — VARCHAR(100) — NOT NULL
- firmware_version — VARCHAR(50)
- created_at — TIMESTAMP — NOT NULL
users
- id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- password_hash — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(100) — NOT NULL
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL
- deleted_at — TIMESTAMP
walk_locations
- id — BIGINT — Primary key — NOT NULL
- walk_id — BIGINT — Foreign key → walks.id — NOT NULL
- sequence_no — INT — NOT NULL
- latitude — DECIMAL(10,7) — NOT NULL
- longitude — DECIMAL(10,7) — NOT NULL
- accuracy_meters — DECIMAL(8,2)
- recorded_at — TIMESTAMP — NOT NULL
walk_photos
- id — BIGINT — Primary key — NOT NULL
- walk_id — BIGINT — Foreign key → walks.id — NOT NULL
- walk_location_id — BIGINT — Foreign key → walk_locations.id
- sequence_no — INT — NOT NULL
- storage_provider — VARCHAR(30) — NOT NULL
- object_key — VARCHAR(500) — NOT NULL
- mime_type — VARCHAR(100) — NOT NULL
- file_size_bytes — BIGINT
- checksum — VARCHAR(128)
- captured_at — TIMESTAMP — NOT NULL
- created_at — TIMESTAMP — NOT NULL
walk_proposals
- id — BIGINT — Primary key — NOT NULL
- robot_pairing_id — BIGINT — Foreign key → robot_pairings.id — NOT NULL
- reason — VARCHAR(100) — NOT NULL
- message — VARCHAR(500) — NOT NULL
- status — VARCHAR(30) — NOT NULL
- proposed_at — TIMESTAMP — NOT NULL
- expires_at — TIMESTAMP
- responded_at — TIMESTAMP
walks
- id — BIGINT — Primary key — NOT NULL
- robot_pairing_id — BIGINT — Foreign key → robot_pairings.id — NOT NULL
- proposal_id — BIGINT — Foreign key → walk_proposals.id
- status — VARCHAR(30) — NOT NULL
- started_at — TIMESTAMP — NOT NULL
- ended_at — TIMESTAMP
- distance_meters — DECIMAL(10,2)
- duration_seconds — INT
- created_at — TIMESTAMP — NOT NULL
- updated_at — TIMESTAMP — NOT NULL