biling1
Tables (9)
ChatRooms (Untitled7)
- id (Key) — int — Primary key — NOT NULL
- post_id (Reference) — int
- sender_id (FK2) — int
- receiver_id (FK3) — int
- is_active (Field4) — boolean
- last_message_at (Field5) — timestamp
- created_at (Field6) — timestamp
- id (Key2) — int — Foreign key → User.id — NOT NULL
- id (Key3) — int — Foreign key → Posts.id — NOT NULL
Messages (Untitled8)
- id (Key) — int — Primary key — NOT NULL
- chat_room_id (FK1) — int
- sender_id (FK2) — int
- content (Field3) — text
- is_read (Field4) — boolean
- created_at (Field5) — timestamp
- id (Key2) — int — Foreign key → ChatRooms.id — NOT NULL
Notifications (Untitled6)
- id (Key) — int — Primary key — NOT NULL
- user_id (Field) — int
- type (Field2) — int
- content (Field3) — text
- is_read (Field4) — boolean
- created_at (Field5) — timestamp
- id (Key2) — int — Foreign key → User.id — NOT NULL
PostImages (Untitled2)
- id (Key) — int — Primary key — NOT NULL
- post_id (Reference) — int
- image_url (Field2) — varchar(255)
- order_sequence (Field3) — int
- image_type (Field4) — varchar(20)
- created_at (Field5) — timestamp
- id (Key2) — int — Foreign key → Posts.id — NOT NULL
PostTags (Untitled3)
- Key — int — Primary key — NOT NULL
- post_id (Reference) — int
- tag_name (Field2) — varchar(30)
- id (Key2) — int — Foreign key → Posts.id — NOT NULL
Posts (Untitled)
- id (Key) — int — Primary key — NOT NULL
- user_id (Reference) — int
- post_type (Field2) — varchar(10)
- title (Field3) — varchar(100)
- content (Field4) — text
- category (Field5) — varchar(20)
- price (Field6) — decimal(10,2)
- status (Field7) — varchar(20)
- location_latitude (Field8) — decimal(10,8)
- location_longitude (Field9) — decimal(11,8)
- trading_location (Field10) — varchar(100)
- is_completed (Field11) — boolean
- available_from (Field13) — date
- available_util (Field12) — date
- created_at (Field14) — timestamp
- updated_at (Field15)
- id (Key2) — int — Foreign key → User.id — NOT NULL
Reviews (Untitled4)
- id (Key) — int — Primary key — NOT NULL
- chat_room_id (FK1) — int
- reviewer_id (FK2) — int
- reviewee_id (FK3) — int
- rating (Field4) — int
- content (Field5) — text
- created_at (Field6) — timestamp
- id (Key2) — int — Foreign key → User.id — NOT NULL
- id (Key3) — int — Foreign key → ChatRooms.id — NOT NULL
User (users)
- id (Key) — int — Primary key — NOT NULL
- kakao_id (Field) — varchar(50)
- nickname (Field2) — varchar(30)
- bio (Field3) — text
- location (Field4) — varchar(100)
- latitude (Field5) — decimal(10,8)
- longtitude (Field6) — decimal(11,8)
- tier_level (Field7) — int
- profile_image (Field8) — varchar(255)
- transaction_count (Field9) — int
- created_at (Field10) — timestamp
- updated_at (Field11)
UserImages (Untitled5)
- id (Key) — int — Primary key — NOT NULL
- user_id (Field) — int
- image_url (Field2) — varchar(255)
- order_sequence (Field3) — int
- created_at (Field4) — timestamp
- id (Key2) — int — Foreign key → User.id — NOT NULL