fitlog

Tables (6)

exercises

  • exercise_id — INT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • category — VARCHAR(50) — NOT NULL — 가슴/등/하체/어깨/팔/복근/유산소
  • is_custom — BOOLEAN — NOT NULL
  • created_by — INT — Foreign key → users.user_id

routine_exercises

  • id — INT — Primary key — NOT NULL
  • routine_id — INT — Foreign key → routines.routine_id — NOT NULL
  • exercise_id — INT — Foreign key → exercises.exercise_id — NOT NULL
  • order_index — INT — NOT NULL
  • target_sets — INT

routines

  • routine_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • is_public — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

users

  • user_id — INT — Primary key — NOT NULL
  • email — VARCHAR(100) — NOT NULL
  • password_hash — VARCHAR(255) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • height_cm — FLOAT
  • weight_kg — FLOAT
  • created_at — DATETIME — NOT NULL

workout_sessions

  • session_id — INT — Primary key — NOT NULL
  • user_id — INT — Foreign key → users.user_id — NOT NULL
  • routine_id — INT — Foreign key → routines.routine_id
  • started_at — DATETIME — NOT NULL
  • ended_at — DATETIME
  • memo — TEXT

workout_sets

  • set_id — INT — Primary key — NOT NULL
  • session_id — INT — Foreign key → workout_sessions.session_id — NOT NULL
  • exercise_id — INT — Foreign key → exercises.exercise_id — NOT NULL
  • set_number — INT — NOT NULL
  • weight_kg — FLOAT
  • reps — INT
  • is_completed — BOOLEAN — NOT NULL