ㅇㅇㅇㅇㅇㅇㅇㅇ
Tables (12)
chat_messages
- message_id — BIGINT — Primary key — NOT NULL
- chat_room_id — BIGINT — Foreign key → chat_rooms.chat_room_id — NOT NULL
- sender_id — BIGINT — Foreign key → users.user_id — NOT NULL
- message_type — ENUM( 'TEXT', 'IMAGE', 'DUMP', 'SYSTEM' ) — NOT NULL
- content — TEXT
- image_url — VARCHAR(500)
- shared_dump_id — BIGINT — Foreign key → dumps.dump_id
- created_at — DATETIME — NOT NULL
chat_participants
- chat_participant_id — BIGINT — Primary key — NOT NULL
- chat_room_id — BIGINT — Foreign key → chat_rooms.chat_room_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- joined_at — DATETIME — NOT NULL
- last_read_at — DATETIME
chat_rooms
- chat_room_id — BIGINT — Primary key — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id
- room_type — ENUM( 'DIRECT', 'SHARED_DUMP' ) — NOT NULL
- room_name — VARCHAR(100)
- created_at — DATETIME — NOT NULL
comments
- comment_id — BIGINT — Primary key — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- content — VARCHAR(500) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
dump_participants
- dump_participant_id — BIGINT — Primary key — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- role — ENUM( 'OWNER', 'MEMBER' ) — NOT NULL
- joined_at — DATETIME — NOT NULL
dumps
- dump_id — BIGINT — Primary key — NOT NULL
- owner_id — BIGINT — Foreign key → users.user_id — NOT NULL
- title — VARCHAR(100) — NOT NULL
- description — TEXT
- dump_type — ENUM( 'WEEK', 'EVENT' ) — NOT NULL
- visibility — ENUM( 'PRIVATE', 'FRIENDS', 'PARTICIPANTS' ) — NOT NULL
- is_shared — BOOLEAN — NOT NULL
- cover_photo_url — VARCHAR(500)
- place_name — VARCHAR(100)
- latitude — DECIMAL(10, 7)
- longitude — DECIMAL(10, 7)
- start_date — DATE
- end_date — DATE
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
friendships
- friendship_id — BIGINT — Primary key — NOT NULL
- requester_id — BIGINT — Foreign key → users.user_id — NOT NULL
- receiver_id — BIGINT — Foreign key → users.user_id — NOT NULL
- status — ENUM( 'PENDING', 'ACCEPTED', 'REJECTED', 'BLOCKED' ) — NOT NULL
- created_at — DATETIME — NOT NULL
- accepted_at — DATETIME
notifications
- notification_id — BIGINT — Primary key — NOT NULL
- receiver_id — BIGINT — Foreign key → users.user_id — NOT NULL
- sender_id — BIGINT — Foreign key → users.user_id
- notification_type — ENUM( 'FRIEND_REQUEST', 'FRIEND_ACCEPT', 'COMMENT', 'REACTION', 'SHARED_INVITE', 'CHAT_MESSAGE', 'STORY_MENTION' ) — NOT NULL
- target_type — ENUM( 'USER', 'DUMP', 'COMMENT', 'CHAT_ROOM', 'STORY' ) — NOT NULL
- target_id — BIGINT — NOT NULL
- is_read — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
photos
- photo_id — BIGINT — Primary key — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id — NOT NULL
- uploader_id — BIGINT — Foreign key → users.user_id — NOT NULL
- image_url — VARCHAR(500) — NOT NULL
- caption — VARCHAR(500)
- photo_order — INT — NOT NULL
- taken_at — DATETIME
- created_at — DATETIME — NOT NULL
reactions
- reaction_id — BIGINT — Primary key — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- emoji_type — ENUM( 'HEART', 'LAUGH', 'SAD', 'LIKE', 'FIRE' ) — NOT NULL
- created_at — DATETIME — NOT NULL
stories
- story_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → users.user_id — NOT NULL
- dump_id — BIGINT — Foreign key → dumps.dump_id
- media_url — VARCHAR(500) — NOT NULL
- media_type — ENUM( 'IMAGE', 'VIDEO' ) — NOT NULL
- story_text — VARCHAR(300)
- music_url — VARCHAR(500)
- place_name — VARCHAR(100)
- expires_at — DATETIME — NOT NULL
- created_at — DATETIME — NOT NULL
users
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(100) — NOT NULL
- password — VARCHAR(255) — NOT NULL
- nickname — VARCHAR(30) — NOT NULL
- profile_image_url — VARCHAR(500)
- bio — VARCHAR(200)
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL