prompt_market

Tables (7)

comment

  • comment_id — BIGINT — Primary key — NOT NULL
  • prompt_id — BIGINT — Foreign key → prompt.prompt_id — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • content — VARCHAR(1000) — NOT NULL
  • status — ENUM('ACTIVE','DELETED') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • INDEX — idx_comment_status

follow

  • follow_id — BIGINT — Primary key — NOT NULL
  • follower_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • following_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • created_at — DATETIME — NOT NULL

likes

  • likes_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • prompt_id — BIGINT — Foreign key → prompt.prompt_id — NOT NULL
  • created_at — DATETIME — NOT NULL

prompt

  • prompt_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • content — TEXT — NOT NULL
  • preview — TEXT — NOT NULL
  • thumbnail_url — VARCHAR(500)
  • price — INT — NOT NULL
  • category — ENUM('FRONTEND','BACKEND','AI','DB','ETC') — NOT NULL
  • ai_type — ENUM('GPT4','CLAUDE','GEMINI','ETC') — NOT NULL
  • rating — FLOAT — NOT NULL
  • view_count — INT — NOT NULL
  • status — ENUM('ACTIVE','HIDDEN','DELETED') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • INDEX — idx_prompt_category
  • INDEX — idx_prompt_ai_type
  • INDEX — idx_prompt_status
  • INDEX — idx_prompt_price
  • INDEX — idx_prompt_rating

purchase

  • purchase_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • prompt_id — BIGINT — Foreign key → prompt.prompt_id — NOT NULL
  • price — INT — NOT NULL
  • purchased_at — DATETIME — NOT NULL
  • INDEX — idx_purchase_purchased_at

rating

  • rating_id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.user_id — NOT NULL
  • prompt_id — BIGINT — Foreign key → prompt.prompt_id — NOT NULL
  • score — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

user

  • user_id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • role — ENUM('USER','ADMIN') — NOT NULL
  • status — ENUM('ACTIVE','SUSPENDED','DELETED') — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME
  • INDEX — idx_user_status