sallim-db
Tables (5)
Chat Message (chatmessage)
- PK (chat_message_id) — bigint — Primary key — NOT NULL
- FK (chat_room_id) — bigint — Foreign key → Chatroom.PK — NOT NULL
- FK (sender_id) — bigint — Foreign key → User.PK — NOT NULL
- FK (receiver_id) — bigint — Foreign key → User.PK — NOT NULL
- Field (content) — varchar(2048)
- Field (created_at) — timestamp
Chatroom (chat_room)
- PK (chat_room_id) — bigint — Primary key — NOT NULL
- PK (product_id) — bigint — Foreign key → Product.PK — NOT NULL
- PK (seller_id) — bigint — Foreign key → User.PK — NOT NULL
- PK (buyer_id) — bigint — Foreign key → User.PK — NOT NULL
- Field (created_at) — timestamp
Product (product)
- PK (product_id) — bigint — Primary key — NOT NULL
- FK (seller_id) — bigint — Foreign key → User.PK — NOT NULL
- Field (created_at) — timestamp
Product Photo (product_photo)
- PK (product_photo_id) — bigint — Primary key — NOT NULL
- FK (product_id) — bigint — Foreign key → Product.PK — NOT NULL
- Field (url) — varchar(2048)
- Field (created_at) — timestamp
- FK (seller_id) — bigint — NOT NULL
User (users)
- PK (user_id) — bigint — Primary key — NOT NULL