ㄴㄹㅇ

Tables (15)

assistant_actions

  • id — BIGSERIAL — Primary key — NOT NULL
  • turn_id — BIGINT — Foreign key → voice_turns.id — NOT NULL
  • type — VARCHAR(20) — NOT NULL
  • payload — JSONB

command_intents

  • id — BIGSERIAL — Primary key — NOT NULL
  • code — VARCHAR(50) — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • example_phrases — TEXT

cook_sessions

  • id — BIGSERIAL — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • recipe_id — BIGINT — Foreign key → recipes.id — NOT NULL
  • current_step — INT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • started_at — TIMESTAMP — NOT NULL

ingredients

  • id — BIGSERIAL — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL

recipe_ingredients

  • id — BIGSERIAL — Primary key — NOT NULL
  • recipe_id — BIGINT — Foreign key → recipes.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • amount — VARCHAR(50)
  • item_order — INT

recipe_steps

  • id — BIGSERIAL — Primary key — NOT NULL
  • recipe_id — BIGINT — Foreign key → recipes.id — NOT NULL
  • step_order — INT — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • instruction — TEXT
  • video_start_sec — INT
  • video_end_sec — INT

recipes

  • id — BIGSERIAL — Primary key — NOT NULL
  • source_video_id — BIGINT — Foreign key → source_videos.id — NOT NULL
  • created_by — BIGINT — Foreign key → users.id — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • summary — TEXT
  • servings — INT
  • total_time_min — INT
  • status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

review_photos

  • id — BIGSERIAL — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → reviews.id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL

reviews

  • id — BIGSERIAL — Primary key — NOT NULL
  • recipe_id — BIGINT — Foreign key → recipes.id — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • rating — SMALLINT — NOT NULL
  • text — TEXT
  • created_at — TIMESTAMP — NOT NULL

saves

  • id — BIGSERIAL — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • recipe_id — BIGINT — Foreign key → recipes.id — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

source_videos

  • id — BIGSERIAL — Primary key — NOT NULL
  • youtube_id — VARCHAR(20) — NOT NULL
  • title — VARCHAR(255) — NOT NULL
  • channel — VARCHAR(100)
  • duration_sec — INT
  • thumbnail_url — VARCHAR(500)
  • created_at — TIMESTAMP — NOT NULL

step_details

  • id — BIGSERIAL — Primary key — NOT NULL
  • step_id — BIGINT — Foreign key → recipe_steps.id — NOT NULL
  • detail_order — INT — NOT NULL
  • text — TEXT — NOT NULL

timers

  • id — BIGSERIAL — Primary key — NOT NULL
  • session_id — BIGINT — Foreign key → cook_sessions.id — NOT NULL
  • label — VARCHAR(100)
  • duration_sec — INT — NOT NULL
  • remaining_sec — INT

users

  • id — BIGSERIAL — Primary key — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

voice_turns

  • id — BIGSERIAL — Primary key — NOT NULL
  • session_id — BIGINT — Foreign key → cook_sessions.id — NOT NULL
  • role — VARCHAR(10) — NOT NULL
  • text — TEXT
  • intent — VARCHAR(50)
  • referenced_step_id — BIGINT — Foreign key → recipe_steps.id
  • created_at — TIMESTAMP — NOT NULL