polymarket erd
Tables (9)
ChatRoom
- chatroom_id — bigint — Primary key — NOT NULL
- user1_id — bigint — Foreign key → User.user_id — NOT NULL
- user2_id — bigint — Foreign key → User.user_id — NOT NULL
- product_id — bigint — Foreign key → Product.product_id — NOT NULL
- create_date — datetime
Chat_File
- file_id — bigint — Primary key — NOT NULL
- message_id — bigint — Foreign key → Chat_Message.message_id — NOT NULL
- create_date — datetime
- file_url — varchar(255)
Chat_Message
- message_id — bigint — Primary key — NOT NULL
- chatroom_id — bigint — Foreign key → ChatRoom.chatroom_id — NOT NULL
- message_content — text
- create_date — datetime
- is_read — tinyint
- user_id — bigint
Product
- product_id — bigint — Primary key — NOT NULL
- product_title — varchar(50)
- category_id — int — Foreign key → Product_Category.category_id — NOT NULL
- product_content — text
- product_price — int
- create_date — datetime
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- update_date — datetime
- product_wish_num — int
- product_view_num — int
- product_chat_num — int
- product_status — varchar(50)
- is_delete — tinyint
Product_Category
- category_id — int — Primary key — NOT NULL
- category_name — varchar(50)
Product_File
- file_id — bigint — Primary key — NOT NULL
- product_id — bigint — Foreign key → Product.product_id — NOT NULL
- file_sequence — int
- crete_date (create_date) — datetime
- file_url — varchar(255)
User
- user_id — bigint — Primary key — NOT NULL
- email — varchar(255)
- password — varchar(50)
- nickname — varchar(10)
- create_date — datetime
- update_date (update_dat e) — datetime
- kakao_id — bigint
- naver_id — bigint
- is_verify — tinyint
- verify_code — int
- user_status — varchar(30)
- is_delete — tinyint
User_Profile_File
- file_id — bigint — Primary key — NOT NULL
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- create_date — datetime
- file_url — varchar(255)
User_Wish_Item
- user_id — bigint — Foreign key → User.user_id — NOT NULL
- product_id — bigint — Foreign key → Product.product_id — NOT NULL
- create_date — datetime