IEUM
Tables (17)
answers
- answer_id — BIGSERIAL — Primary key — NOT NULL
- question_id — BIGINT — Foreign key → questions.question_id — NOT NULL
- author_id — BIGINT — Foreign key → users.user_id — NOT NULL
- content — TEXT — NOT NULL
- is_accepted — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
chat_members
- room_id — BIGINT — Foreign key → chat_rooms.room_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- joined_at — TIMESTAMPTZ — NOT NULL
- left_at — TIMESTAMPTZ
- last_read_at — TIMESTAMPTZ
- pinned_at — TIMESTAMPTZ
- notify_enabled — BOOLEAN — NOT NULL
chat_rooms
- room_id — BIGSERIAL — Primary key — NOT NULL
- room_type — room_type — NOT NULL
- meeting_id — BIGINT — Foreign key → meetings.meeting_id
- question_id — BIGINT — Foreign key → questions.question_id
- direct_key — VARCHAR(50)
- created_at — TIMESTAMPTZ — NOT NULL
email_verifications
- verification_id — BIGSERIAL — Primary key — NOT NULL
- email — VARCHAR(255) — NOT NULL
- code — VARCHAR(10) — NOT NULL
- is_used — BOOLEAN — NOT NULL
- expires_at — TIMESTAMPTZ — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
friendships
- friendship_id — BIGSERIAL — Primary key — NOT NULL
- requester_id — BIGINT — Foreign key → users.user_id — NOT NULL
- addressee_id — BIGINT — Foreign key → users.user_id — NOT NULL
- status — friendship_status — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
inquiries
- inquiry_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- status — inquiry_status — NOT NULL
- answer — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- answered_at — TIMESTAMPTZ
meeting_participants
- meeting_id — BIGINT — Foreign key → meetings.meeting_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- status — participant_status — NOT NULL
- joined_at — TIMESTAMPTZ — NOT NULL
meetings
- meeting_id — BIGSERIAL — Primary key — NOT NULL
- pin_id — BIGINT — Foreign key → pins.pin_id — NOT NULL
- host_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT
- meeting_at — TIMESTAMPTZ — NOT NULL
- max_members — SMALLINT — NOT NULL
- icon — VARCHAR(50)
- status — meeting_status — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
messages
- message_id — BIGSERIAL — Primary key — NOT NULL
- room_id — BIGINT — Foreign key → chat_rooms.room_id — NOT NULL
- sender_id — BIGINT — Foreign key → users.user_id — NOT NULL
- content — TEXT
- image_url — TEXT
- created_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
notifications
- notification_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- type — notification_type — NOT NULL
- title — VARCHAR(200) — NOT NULL
- body — TEXT
- ref_id — BIGINT
- is_read — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
password_resets
- reset_id — BIGSERIAL — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- temp_password_hash — VARCHAR(255) — NOT NULL
- is_used — BOOLEAN — NOT NULL
- expires_at — TIMESTAMPTZ — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
pins
- pin_id — BIGSERIAL — Primary key — NOT NULL
- author_id — BIGINT — Foreign key → users.user_id — NOT NULL
- pin_type — pin_type — NOT NULL
- lat — DECIMAL(10, 7) — NOT NULL
- lng — DECIMAL(10, 7) — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ
question_images
- image_id — BIGSERIAL — Primary key — NOT NULL
- question_id — BIGINT — Foreign key → questions.question_id — NOT NULL
- image_url — TEXT — NOT NULL
- sort_order — SMALLINT — NOT NULL
questions
- question_id — BIGSERIAL — Primary key — NOT NULL
- pin_id — BIGINT — Foreign key → pins.pin_id — NOT NULL
- author_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(200) — NOT NULL
- content — TEXT — NOT NULL
- is_resolved — BOOLEAN — NOT NULL
- embedding — vector(1536)
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
reports
- report_id — BIGSERIAL — Primary key — NOT NULL
- reporter_id — BIGINT — Foreign key → users.user_id — NOT NULL
- message_id — BIGINT — Foreign key → messages.message_id
- reason — report_reason — NOT NULL
- detail — TEXT
- status — report_status — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
user_settings
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- language — VARCHAR(5) — NOT NULL
- camera_permission — BOOLEAN — NOT NULL
- push_permission — BOOLEAN — NOT NULL
- notify_all — BOOLEAN — NOT NULL
- notify_meeting — BOOLEAN — NOT NULL
- notify_question — BOOLEAN — NOT NULL
- notify_radius_km — SMALLINT — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
users
- user_id — BIGSERIAL — Primary key — NOT NULL
- email — VARCHAR(255)
- provider — auth_provider — NOT NULL
- provider_uid — VARCHAR(255)
- password_hash — VARCHAR(255)
- nickname — VARCHAR(50) — NOT NULL
- birth_date — DATE
- gender — gender_type
- nationality — VARCHAR(2)
- profile_image_url — TEXT
- email_verified — BOOLEAN — NOT NULL
- last_lat — DECIMAL(10, 7)
- last_lng — DECIMAL(10, 7)
- last_active_at — TIMESTAMPTZ
- is_active — BOOLEAN — NOT NULL
- created_at — TIMESTAMPTZ — NOT NULL
- updated_at — TIMESTAMPTZ — NOT NULL
- deleted_at — TIMESTAMPTZ