TEOS

테이블 (18)

Payment

  • Key (payment_id) — string — 기본 키 — NOT NULL
  • Key (order_id) — string — 외래 키 → 주문.Key — NOT NULL
  • method — payment_method — NOT NULL
  • status — payment_status — NOT NULL
  • Field (created_at) — datetime

강좌 (Lecture)

  • Key (lecture_id) — string — 기본 키 — NOT NULL
  • Key (section_id) — string — 외래 키 → 섹션.Key — NOT NULL
  • Field (index) — number
  • Field (title) — string — NOT NULL
  • Field (description) — string
  • Field (video_url) — string

섹션 (Section)

  • Key (section_id) — string — 기본 키 — NOT NULL
  • Key (course_id) — string — 외래 키 → 코스.Key — NOT NULL
  • Field (index) — number
  • Field (title) — string — NOT NULL
  • Field (description) — string

쇼핑카트 (ShoppingCart)

  • Key (cart_id) — string — 기본 키 — NOT NULL
  • Key (user_id) — string — 외래 키 → 회원정보.Key — NOT NULL
  • Field (created_at) — datetime

수강 (Enrollment)

  • Key (enrollment_id) — string — 기본 키 — NOT NULL
  • Key (user_id) — string — 외래 키 → 회원정보.Key — NOT NULL
  • Key (course_id) — string — 외래 키 → 코스.Key — NOT NULL
  • Field (status) — enum('active','expired','cancelled','refunded') — NOT NULL
  • Field (enrollment_start) — datetime
  • Field (enrollment_end) — datetime

시간 피드백 (FeedbackTimeSegment)

  • Key (segment_id) — string — 기본 키 — NOT NULL
  • Key (feedback_id) — string — 외래 키 → 피드백.Key — NOT NULL
  • Field (comment) — string
  • Field (created_at) — datetime

제출 (Submission)

  • Key (submission_id) — string — 기본 키 — NOT NULL
  • Key (enrollment_id) — string — 외래 키 → 수강.Key — NOT NULL
  • Key (lecture_id) — string — 외래 키 → 강좌.Key — NOT NULL
  • Field (video_url) — string
  • submitted_at — datetime

주문 (Order)

  • Key (order_id) — string — 기본 키 — NOT NULL
  • Key (user_id) — string — 외래 키 → 회원정보.Key — NOT NULL
  • Field (total) — number — NOT NULL
  • Field (status) — enum('pending','paid','cancelled','refunded') — NOT NULL
  • Field (created_at) — datetime

주문 아이템 (OrderItem)

  • Key (order_item_id) — string — 기본 키 — NOT NULL
  • Key (order_id) — string — 외래 키 → 주문.Key — NOT NULL
  • 최종 금액 (unit_price) — number — NOT NULL
  • Key (course_id) — string — 외래 키 → 코스.Key — NOT NULL

카트 아이템 (CartItem)

  • Key (cart_item_id) — string — 기본 키 — NOT NULL
  • Key (cart_id) — string — 외래 키 → 쇼핑카트.Key — NOT NULL
  • Key (course_id) — string — 외래 키 → 코스.Key — NOT NULL
  • Field (original_price) — number
  • Field (created_at) — datetime

코스 (Course)

  • Key (course_id) — string — 기본 키 — NOT NULL
  • Field (title) — string
  • Field (description) — string
  • Field (price) — number
  • Field (created_at) — date

평가 템플릿 (FeedbackMessageTemplate)

  • Key (template_id) — string — 기본 키 — NOT NULL
  • Key (criteria_id) — string — 외래 키 → 평가기준.Key — NOT NULL
  • Field (message) — string
  • Field (rating) — number — NOT NULL
  • Key (teacher_id) — string — 외래 키 → 회원정보.Key
  • Field (created_at) — string

평가기준 (Criteria)

  • Key (criteria_id) — string — 기본 키 — NOT NULL
  • Field (name) — string

평가기준점수 (FeedbackRating)

  • Key (rating_id) — string — 기본 키 — NOT NULL
  • Key (criteria_id) — string — 외래 키 → 평가기준.Key — NOT NULL
  • Key (feedback_id) — string — 외래 키 → 피드백.Key — NOT NULL
  • Field (rating) — number
  • Key (template_id) — string — 외래 키 → 평가 템플릿.Key — NOT NULL
  • Field (message) — string

피드백 (Feedback)

  • Key (feedback_id) — string — 기본 키 — NOT NULL
  • Key (submission_id) — string — 외래 키 → 제출.Key — NOT NULL
  • 마지막으로 수정한 선생님 (updated_by) — string — 외래 키 → 회원정보.Key — NOT NULL
  • Field (comment) — string
  • Field (created_at) — datetime

학교 (School)

  • Key (school_id) — string — 기본 키 — NOT NULL
  • Field (name) — string
  • Field (address) — string
  • Field (email) — string
  • Field (partnership_type) — enum('internal','partner','external')
  • Field (created_at) — datetime

학교 제휴 (SchoolCourseAccess)

  • Key (access_id) — string — 기본 키 — NOT NULL
  • Key (school_id) — string — 외래 키 → 학교.Key — NOT NULL
  • Key (course_id) — string — 외래 키 → 코스.Key — NOT NULL
  • Field (access_type) — enum('free','discounted')
  • Field (discount_rate) — number

회원정보 (User)

  • Key (user_id) — string — 기본 키 — NOT NULL
  • Field (password) — string
  • Field (email) — string
  • Field (phone) — string
  • Field (grade) — enum('Pre-K', 'K', 1~12)
  • Field (name) — string
  • Field (postal_code) — string
  • Field (address_main) — string
  • Field (address_detail) — string
  • Field (role) — enum('student','teacher','admin')
  • Field (created_at) — datetime
  • Key (school_id) — string — 외래 키 → 학교.Key