dino

Tables (15)

ability_score

  • id — BIGINT — Primary key — NOT NULL
  • ability_type — VARCHAR(20) — NOT NULL
  • score — INT — NOT NULL
  • child_id — BIGINT — Foreign key → child.id — NOT NULL
  • INDEX — `FKdts3ga7oov5r7stm79wfrobu4`

chat_message

  • id — BIGINT — Primary key — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • message — TEXT — NOT NULL
  • sender — VARCHAR(50) — NOT NULL
  • session_id — BIGINT — Foreign key → chat_session.id — NOT NULL
  • INDEX — `FKgtjn4wh83q8ohixkwcotpoob9`

chat_session

  • id — BIGINT — Primary key — NOT NULL
  • child_id — BIGINT
  • ended_at — DATETIME(6)
  • started_at — DATETIME(6) — NOT NULL
  • story_completion_id — BIGINT
  • last_closed_at — DATETIME(6)

child

  • id — BIGINT — Primary key — NOT NULL
  • birth_date — DATE
  • concerns — JSON
  • created_at — DATETIME(6)
  • gender — VARCHAR(10)
  • interests — JSON
  • name — VARCHAR(50) — NOT NULL
  • updated_at — DATETIME(6)
  • parent_id — BIGINT — Foreign key → members.id — NOT NULL
  • INDEX — `FKme8nsnrdcq8k7n22d2eo43ofk`

child_dino

  • id — BIGINT — Primary key — NOT NULL
  • color_type — VARCHAR(255)
  • dino_name — VARCHAR(255)
  • hatch_date — VARCHAR(255)
  • hatched — BIT(1) — NOT NULL
  • member_id — BIGINT
  • child_id — BIGINT

child_reward

  • id — BIGINT — Primary key — NOT NULL
  • child_id — BIGINT
  • eggs — INT — NOT NULL
  • stars — INT — NOT NULL

choice

  • id — BIGINT — Primary key — NOT NULL
  • ability_points — INT — NOT NULL
  • ability_type — VARCHAR(50) — NOT NULL
  • choice_text — TEXT — NOT NULL
  • next_scene_id — BIGINT — Foreign key → scene.id
  • scene_id — BIGINT — Foreign key → scene.id — NOT NULL
  • INDEX — `FKl71etufranqs34dg0hnsum86e`
  • INDEX — `FKgfahrwlkkk7aqcv2rsljhrvdw`

emotion_log

  • id — BIGINT — Primary key — NOT NULL
  • context — TEXT
  • emotion — VARCHAR(20) — NOT NULL
  • interests — JSON
  • recorded_at — DATETIME(6)
  • sentiment — VARCHAR(20)
  • source — VARCHAR(20)
  • child_id — BIGINT — Foreign key → child.id — NOT NULL
  • INDEX — `FKrlollfbic9iivr53nsnybghgf`

image_generation

  • id — BIGINT — Primary key — NOT NULL
  • completed_at — DATETIME(6)
  • error_message — TEXT
  • image_url — TEXT
  • prompt — TEXT
  • requested_at — DATETIME(6) — NOT NULL
  • scene_id — BIGINT
  • status — VARCHAR(50)
  • style — VARCHAR(255)

member_reward_entity

  • id — BIGINT — Primary key — NOT NULL
  • eggs — INT — NOT NULL
  • member_id — BIGINT
  • stars — INT — NOT NULL

members

  • id — BIGINT — Primary key — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • provider — ENUM('GOOGLE', 'KAKAO', 'NAVER') — NOT NULL
  • provider_id — VARCHAR(100) — NOT NULL
  • role — ENUM('ADMIN', 'USER') — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • last_selected_child_id — BIGINT

refresh_tokens

  • id — BIGINT — Primary key — NOT NULL
  • expiry_date — DATETIME(6) — NOT NULL
  • token — VARCHAR(500) — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • INDEX — `FK9bb9t1ma4ltt5ngdk10bkna2c`

scene

  • id — BIGINT — Primary key — NOT NULL
  • content — TEXT — NOT NULL
  • image_prompt — TEXT
  • image_url — TEXT
  • scene_number — INT — NOT NULL
  • story_id — BIGINT — Foreign key → story.id — NOT NULL
  • INDEX — `FK5wgvktdlgqbhklchxxvyknriu`

story

  • id — BIGINT — Primary key — NOT NULL
  • age_max — INT
  • age_min — INT
  • category — VARCHAR(50)
  • cover_image_url — VARCHAR(500)
  • created_at — DATETIME(6)
  • description — TEXT
  • estimated_time — INT
  • pinecone_id — VARCHAR(50)
  • theme — VARCHAR(50)
  • title — VARCHAR(200) — NOT NULL

story_completion

  • id — BIGINT — Primary key — NOT NULL
  • ability_score — INT
  • choices_json — TEXT
  • completed_at — DATETIME(6)
  • emotion — VARCHAR(50)
  • interests — JSON
  • story_title — VARCHAR(200)
  • total_time — INT
  • child_id — BIGINT — Foreign key → child.id — NOT NULL
  • story_id — BIGINT — Foreign key → story.id — NOT NULL
  • INDEX — `FKtkqf75lamxf2xm8ektlr81cwt`
  • INDEX — `FKoqn7s0i1gcu4338x8rnc7iei7`