TEST
Tables (17)
answers
- answer_id — int — Primary key — NOT NULL
- question_id — int — Foreign key → questions.question_id — NOT NULL
- user_id — int — Foreign key → questions.user_id — NOT NULL
- lecture_id — int — Foreign key → questions.lecture_id — NOT NULL
- content — text — NOT NULL
- reply_date — timestamp — NOT NULL
board_imgaes
- board_image_id — int — 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
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- user_id — int — Foreign key → members.user_id — NOT NULL
lecture_lists
- lecture_list_id — int — Primary key — NOT NULL
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- user_id — int — Foreign key → lectures.user_id — NOT NULL
- title — varchar(100) — NOT NULL
- describe — text — NOT NULL
- start_time — timestamp — NOT NULL
- end_time — timestamp
- finished — boolean — NOT NULL — 수업 중/종료
lecture_schedules
- user_id — int — Foreign key → members.user_id — NOT NULL
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- is_refundable — boolean — NOT NULL
- enter_time — timestamp — NULL일 경우 입장안한걸로(출석율과 연관)
- play_time — timestamp — 진도율과 연관
- out_time — timestamp
lectures
- lecture_id — int — Primary key — NOT NULL
- user_id — int — Foreign key → members.user_id — NOT NULL
- title — varchar(100) — NOT NULL
- describe — text — NOT NULL
- category — varchar(300) — NOT NULL
- price — int — NOT NULL
- status — boolean — NOT NULL
- link — varchar(300)
- like — int — NOT NULL — 좋아요 총합
- file — text
- limit_student — int — NOT NULL
- deadline_time — timestamp — NOT NULL
- lectures_date — timestamp — NOT NULL
lectures_images
- lectures_image_id — int — Primary key — NOT NULL
- url — varchar(100) — NOT NULL
- lecture_id — int — NOT NULL
- user_id — int — NOT NULL
lectures_tags
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- tag_id — int — NOT NULL
likes
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- user_id — int — Foreign key → members.user_id — NOT NULL
- like_status — boolean — NOT NULL — false일 경우엔 추가 ,true일 경우엔 취소
logs
- log_id — int — 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
member_images
- user_image_id — int — Primary key — NOT NULL
- user_id — int — NOT NULL
- url — varchar(100) — NOT NULL
members
- user_id — int — Primary key — NOT NULL
- id — varchar(50) — NOT NULL
- password — varchar(255) — NOT NULL
- 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 — int — Foreign key → members.user_id — NOT NULL
- tag_id — int — NOT NULL
pays
- user_id — int — Foreign key → lecture_schedules.user_id — NOT NULL
- lecture_id — int — Foreign key → lecture_schedules.lecture_id — NOT NULL
- status — booolean — NOT NULL — 결제에 대한 환불 여부
- pays_date — timestamp — NOT NULL
- refund_date — timestamp
questions
- question_id — int — Primary key — NOT NULL
- user_id — int — Foreign key → members.user_id — NOT NULL
- lecture_id — int — 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 — int — Primary key — NOT NULL
- lecture_id — int — Foreign key → lectures.lecture_id — NOT NULL
- user_id — int — Foreign key → members.user_id — NOT NULL
- content — text — NOT NULL
- status — boolean — NOT NULL
- review_date — timestamp — NOT NULL
- answer_id — int — 리뷰 답글 달 review_id
tags
- tag_id — int — Primary key — NOT NULL
- tags_name — varcahar(200)