Rootin_test

Tables (15)

ai_result

  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • result_content — LONGTEXT — NOT NULL
  • tool_type — ENUM('QUIZ', 'SUMMARY') — NOT NULL
  • count — INT
  • difficulty — ENUM('HIGH', 'MEDIUM', 'LOW')
  • created_at — DATETIME — NOT NULL

image

  • id — BIGINT — Primary key — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • url — VARCHAR(500)
  • image_order — INT
  • created_at — DATETIME

plant

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100)
  • grade — ENUM('RARE', 'COMMON')
  • growth_stage — ENUM('SEED', 'SPROUT', 'MATURE', 'BLOOM', 'FULL_BLOOM')
  • image_url — VARCHAR(500)
  • silhouette_url — VARCHAR(500)

plant_collection

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • plant_id — BIGINT — Foreign key → plant.id — NOT NULL
  • created_at — DATETIME

plant_item

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • pot_id — BIGINT — Foreign key → pot.id — NOT NULL
  • plant_id — BIGINT — Foreign key → plant.id — NOT NULL
  • harvested_level — INT
  • is_harvested — TINYINT(1)
  • is_displayed — TINYINT(1)
  • position_x — INT
  • position_y — INT
  • harvested_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • growth_exp — INT

point_log

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • amount — INT — NOT NULL
  • reason — ENUM('TIL', 'AI') — NOT NULL
  • created_at — DATETIME — NOT NULL

post

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • title — VARCHAR(50)
  • content — LONGTEXT
  • status — ENUM('DRAFT', 'PUBLISHED')
  • updated_at — DATETIME
  • created_at — DATETIME

pot

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • description — VARCHAR(255)
  • level — INT — NOT NULL
  • total_exp — INT — NOT NULL
  • is_displayed — TINYINT(1)
  • position_x — INT
  • position_y — INT
  • created_at — DATETIME — NOT NULL

refresh_token

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → user.id — NOT NULL
  • token — VARCHAR(512) — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL

tag

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL

template

  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • is_default — TINYINT(1) — NOT NULL

til

  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • pot_id — BIGINT — Foreign key → pot.id — NOT NULL
  • published_at — DATETIME

til_tag

  • tag_id — BIGINT — Foreign key → tag.id — NOT NULL
  • til_id — BIGINT — Foreign key → til.post_id — NOT NULL

user

  • id — BIGINT — Primary key — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • profile_image — VARCHAR(500)
  • password — VARCHAR(100)
  • bio — VARCHAR(255)
  • point — INT — NOT NULL
  • role — ENUM('USER', 'ADMIN') — NOT NULL
  • provider_id — VARCHAR(255)
  • provider — VARCHAR(20)
  • created_at — DATETIME — NOT NULL

watering_log

  • id — BIGINT — Primary key — NOT NULL
  • pot_id — BIGINT — Foreign key → pot.id — NOT NULL
  • post_id — BIGINT — Foreign key → post.id — NOT NULL
  • exp_gained — INT — NOT NULL
  • point_gained — INT
  • watered_at — DATETIME — NOT NULL