이건해야해

테이블 (9)

certificate_issues

  • issue_id — BIGINT
  • certificate_id — BIGINT — NOT NULL
  • user_id — BIGINT — NOT NULL
  • issued_at — TIMESTAMP — NOT NULL

certificates

  • certificate_id — BIGINT
  • course_id — BIGINT — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • required_completion_count — INT

courses

  • course_id — BIGINT
  • instructor_id — BIGINT — NOT NULL
  • course_name — VARCHAR(200) — NOT NULL
  • price — DECIMAL(10, 2) — NOT NULL
  • course_status — VARCHAR(20) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

enrollments

  • enrollment_id — BIGINT
  • user_id — BIGINT — NOT NULL
  • course_id — BIGINT — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • enrolled_at — TIMESTAMP — NOT NULL

lesson_progress

  • progress_id — BIGINT
  • enrollment_id — BIGINT — NOT NULL
  • lesson_id — BIGINT — NOT NULL
  • is_completed — BOOLEAN — NOT NULL
  • last_played_sec — INT
  • updated_at — TIMESTAMP — NOT NULL

lessons

  • lesson_id — BIGINT
  • course_id — BIGINT — NOT NULL
  • title — VARCHAR(200) — NOT NULL
  • order_no — INT — NOT NULL
  • duration_sec — INT — NOT NULL

order_items

  • order_item_id — BIGINT
  • order_id — BIGINT — NOT NULL
  • course_id — BIGINT — NOT NULL
  • unit_price — DECIMAL(10, 2) — NOT NULL
  • quantity — INT — NOT NULL

orders

  • order_id — BIGINT
  • user_id — BIGINT — NOT NULL
  • order_date — TIMESTAMP — NOT NULL
  • status — VARCHAR(20) — NOT NULL

users

  • user_id — BIGINT
  • username — VARCHAR(100) — NOT NULL
  • password — VARCHAR(255) — NOT NULL
  • full_name — VARCHAR(50) — NOT NULL
  • is_instructor — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL