Biling_ERD_v1_2
Tables (7)
Chat room (chat_room)
- ID (id) — INT — Primary key — NOT NULL
- Post ID (post_id) — INT — Foreign key → Post.ID — NOT NULL
- Renter ID (renter_id) — INT — Foreign key → User.ID — NOT NULL
- Owner ID (owner_id) — INT — Foreign key → User.ID — NOT NULL
- Last Message Content (last_message_content) — TEXT
- Last Message TIME (last_message_time) — DATE
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
Chat_message (chat_message)
- ID (id) — INT — Primary key — NOT NULL
- Chatroom ID (chatroom_id) — INT — Foreign key → Chat room.ID — NOT NULL
- Sender ID (sender_id) — INT — Foreign key → User.ID — NOT NULL
- Content (content) — TEXT
- Is read (is_read) — INT(1)
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
Post (post)
- ID (id) — INT — Primary key — NOT NULL
- Writer ID (writer_id) — INT — Foreign key → User.ID — NOT NULL
- Type (type) — ENUM
- Title (title) — VARCHAR(?)
- Content (content) — TEXT
- Price (price) — INT
- Distance (distance) — ENUM
- Category (category) — ENUM
- Expiration Date (expiration_date) — DATETIME
- Location Name (location_name) — TEXT
- Location Latitude (location_latitude) — DOUBLE
- Location Longitude (location_longitude) — DOUBLE
- status — ENUM
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
Post image (post_image)
- ID (id) — INT — Primary key — NOT NULL
- Post ID (post_id) — INT — Foreign key → Post.ID — NOT NULL
- Image URL (image_url) — TEXT
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
- Order Sequence (order_sequence) — int
- Image Type (image_type) — varchar(20)
Review (review)
- ID (id) — INT — Primary key — NOT NULL
- Post ID (post_id) — INT — Foreign key → Post.ID — NOT NULL
- Reviewer ID (reviewer_id) — INT — Foreign key → User.ID — NOT NULL
- Reviewee ID (reviewee_id) — INT — Foreign key → User.ID — NOT NULL
- Rate (rate) — INT
- Content (content) — TEXT
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
User (user)
- ID (id) — INT — Primary key — NOT NULL
- KAKAO ID (kakao_id) — VARCHAR(9)
- Nickname (nickname) — VARCHAR(10)
- Profile Image (profile_image) — TEXT
- Location Name (location_name) — TEXT
- Location Latitude (location_latitude) — DOUBLE
- Location Longitude (location_longitude) — DOUBLE
- bio — TEXT
- Rental Count (rental_count) — INT
- tier — ENUM
- Allow Notification (allow_notification) — INT(1)
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
User_message_read_status (user_message_read_status)
- ID (id) — INT — Primary key — NOT NULL
- User ID (user_id) — TEXT — Foreign key → User.ID — NOT NULL
- Chat Room ID (chatroom_id) — INT — Foreign key → Chat room.ID — NOT NULL
- Create at (create_at) — TIMESTAMP
- Update at (update_at) — TIMESTAMP
- Unread Chat Count (unread_chat_count) — INT
- Chatroom Entry Time (chatroom_entry_time) — DATETIME