HaejoProject

Tables (6)

Bid

  • bid_id — INT — Primary key
  • request_id (request_id2) — INT — Foreign key → Request.request_id
  • bid_amount — INT — NOT NULL
  • bid_status — ENUM('pending', 'accepted', 'rejected')
  • created_at — TIMESTAMP
  • provider_id — INT — Foreign key → User.user_id — NOT NULL

Chat

  • chat_id — INT — Primary key
  • message — TEXT — NOT NULL
  • created_at — TIMESTAMP
  • sender_id — INT — Foreign key → User.user_id — NOT NULL
  • receiver_id — INT — Foreign key → User.user_id — NOT NULL

Notification

  • notification_id — INT — Primary key
  • type — ENUM('bid', 'chat', 'transaction', 'completion') — NOT NULL
  • message — TEXT — NOT NULL
  • is_read — BOOLEAN
  • created_at — TIMESTAMP
  • user_id (user_id2) — INT — Foreign key → User.user_id — NOT NULL

Request

  • request_id — INT — Primary key
  • title — VARCHAR(255) — NOT NULL
  • description — TEXT — NOT NULL
  • budget — INT — NOT NULL
  • status — ENUM('open', 'in_progress', 'completed', 'cancelled')
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP
  • user_id (user_id2) — INT — Foreign key → User.user_id — NOT NULL

Transaction

  • transaction_id — INT — Foreign key → Request.request_id
  • request_id — INT — NOT NULL
  • amount — INT — NOT NULL
  • status — ENUM('pending', 'completed', 'refunded')
  • created_at — TIMESTAMP
  • provider_id — INT — Foreign key → User.user_id — NOT NULL

User

  • user_id — INT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image — VARCHAR(255)
  • created_at — TIMESTAMP
  • updated_at — TIMESTAMP