22

Tables (17)

answers

  • answer_id — bigint — Primary key — NOT NULL
  • question_id — bigint — Foreign key → questions.question_id — NOT NULL
  • user_id — bigint — Foreign key → questions.user_id — NOT NULL
  • lecture_id — bigint — Foreign key → questions.lecture_id — NOT NULL
  • content — text — NOT NULL
  • reply_date — timestamp — NOT NULL

attends

  • attend_id — bigint — Primary key — NOT NULL
  • member_id — bigint — Foreign key → members.member_id — NOT NULL
  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • is_refundable — boolean — NOT NULL

board_imgaes

  • board_image_id — bigint — Primary key — NOT NULL
  • question_id — int — NOT NULL
  • user_id — int — NOT NULL
  • lecture_id — int — NOT NULL
  • url — varchar(100) — NOT NULL

carts

  • cart_id — bigint — Primary key — NOT NULL
  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • user_id — bigint — Foreign key → members.member_id — NOT NULL

lecture_files

  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • user_id — bigint — Foreign key → lectures.member_id — NOT NULL
  • file_url — text — NOT NULL

lecture_lists

  • lecture_list_id — bigint — Primary key — NOT NULL
  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • member_id — bigint — Foreign key → lectures.member_id — NOT NULL
  • title — varchar(100) — NOT NULL
  • description — text — NOT NULL
  • start_time — timestamp — NOT NULL
  • end_time — timestamp — NOT NULL
  • finished — boolean — NOT NULL — 수업 중/종료

lectures

  • lecture_id — bigint — Primary key — NOT NULL
  • member_id — bigint — Foreign key → members.member_id — NOT NULL
  • title — varchar(100) — NOT NULL
  • profile — text
  • description — text — NOT NULL
  • description_pic — text
  • category — varchar(300) — NOT NULL
  • price — int — NOT NULL
  • status — boolean — NOT NULL
  • link — varchar(300)
  • likes — int — NOT NULL — 좋아요 총합
  • limit_student — int — NOT NULL
  • deadline_time — timestamp — NOT NULL
  • lectures_date — timestamp — NOT NULL
  • start_date — timestamp — NOT NULL
  • end_date — timestamp — NOT NULL

lectures_tags

  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • tag_id — int — NOT NULL

likes

  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • user_id — bigint — Foreign key → members.member_id — NOT NULL
  • like_status — boolean — NOT NULL — false일 경우엔 추가 ,true일 경우엔 취소

logs

  • log_id — bigint — Primary key — NOT NULL
  • request_url — varchar(100) — NOT NULL
  • request_method — varchar(10) — NOT NULL
  • response_status — int — NOT NULL
  • client_ip — varchar(30) — NOT NULL
  • request_time — timestamp — NOT NULL

members

  • member_id — bigint — Primary key — NOT NULL
  • id — varchar(50) — NOT NULL — unique
  • password — varchar(255) — NOT NULL
  • profile — text
  • email — varchar(100) — NOT NULL
  • phone — varchar(100) — NOT NULL
  • birth — timestamp — NOT NULL
  • name — varchar(30) — NOT NULL
  • role — varchar(30) — NOT NULL
  • bank — varchar(100) — 선생일 때
  • deleted — boolean — NOT NULL — 회원 탈퇴 여부

members_tags

  • user_id — bigint — Foreign key → members.member_id — NOT NULL
  • tag_id — int — NOT NULL

pays

  • pay_id — BIGINT — Primary key — NOT NULL — Auto increament
  • member_id — bigint — Foreign key → attends.member_id — NOT NULL
  • lecture_id — bigint — Foreign key → attends.lecture_id — NOT NULL
  • status — boolean — NOT NULL — 결제에 대한 환불 여부
  • pays_date — timestamp — NOT NULL
  • refund_date — timestamp

questions

  • question_id — bigint — Primary key — NOT NULL
  • user_id — bigint — Foreign key → members.member_id — NOT NULL
  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • title — varchar(100) — NOT NULL
  • content — text — NOT NULL
  • deleted — boolean — NOT NULL
  • board_date — timestamp — NOT NULL

reviews

  • review_id — bigint — Primary key — NOT NULL
  • lecture_id — bigint — Foreign key → lectures.lecture_id — NOT NULL
  • user_id — bigint — Foreign key → members.member_id — NOT NULL
  • content — text — NOT NULL
  • status — boolean — NOT NULL
  • review_date — timestamp — NOT NULL
  • answer_id — int — 리뷰 답글 달 review_id

students

  • member_id — bigint — Foreign key → attends.member_id — NOT NULL
  • lecture_list_id — bigint — Foreign key → lecture_lists.lecture_list_id — NOT NULL
  • enter_time — timestamp — NULL일 경우 입장안한걸로(출석율과 연관)
  • play_time — timestamp — 진도율과 연관
  • out_time — timestamp

tags

  • tag_id — bigint — Primary key — NOT NULL
  • tags_name — varcahar(200)