AI

Tables (10)

BookMark (북마크)

  • id — auto increment — Primary key — NOT NULL
  • 유저 아이디 (user_id) — not null — Foreign key → User.id — NOT NULL
  • 코스 아이디 (course_id) — not null — Foreign key → Course.pk — NOT NULL
  • 수정날짜 (modified_at) — default = now
  • 생성날짜 (created_at) — default = now

Course (코스)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 평균 평점 (avg_rating) — default = 0
  • 리뷰 개수 (count_review) — default = 0
  • 대표사진 (img_url) — not null
  • 서서 개수 (stand_count) — default = 0
  • 앉아서 개수 (sit_count) — default = 0
  • 밸런스 개수 (balance_count) — default = 0
  • 코어 개수 (core_count) — default = 0
  • 팔 개수 (arm_count) — default = 0
  • 엎드려서 개수 (recline_count) — default = 0

CourseReview (코스리뷰)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 유저 아이디 (user_id) — not null — Foreign key → User.id — NOT NULL
  • 코스 아이디 (course_id) — not null — Foreign key → Course.pk — NOT NULL
  • 평점 (rating) — not null
  • 내용 (content) — not null
  • 삭제 상태 (is_deleted) — default = False
  • 삭제 날짜 (deleted_at) — null = True
  • 생성 날짜 (created_at) — default = now
  • 수정 날짜 (modified_at) — default = now

Course_Exercise (코스 운동 연결)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 코스 아이디 (course_id) — not null — Foreign key → Course.pk — NOT NULL
  • 운동 아이디 (exercise_id) — not null — Foreign key → Exercise.pk — NOT NULL

Exercise (운동)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 운동명 (exercise_name) — not null
  • 영상자료 (youtube_key) — not null
  • 운동타입 (exercise_type) — not null
  • 운동레벨(난이도) (exercise_level) — not null
  • 운동설명 (description) — not null

Tag (해시 태그)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 태그 이름 (tag_name) — not null, unique

User (유저)

  • id — auto increment — Primary key — NOT NULL
  • 이메일 (email) — not null, unique
  • 비밀번호 (password) — not null
  • 닉네임 (nickname) — not null, unique
  • 계정삭제여부 (is_deleted) — not null, default=false
  • 스탭여부 (is_staff) — not null, default=false
  • 최고관리자여부 (is_superuser) — not null, default=false
  • 최근로그인날짜 (last_login) — not null, default=now
  • 생성날짜 (created_at) — not null, default=now
  • 수정날짜 (modified_at) — not null

UserDailyRecord (유저운동정보)

  • id — auto increment — Primary key — NOT NULL
  • 유저아이디 (user_id) — not null — Foreign key → User.id — NOT NULL
  • 운동날짜 (exercise_date) — not null
  • 운동요일 (exercise_day) — not null
  • 일별 총 운동시간 (exercise_total) — not null
  • 일별 총 소모칼로리 (calories_total) — not null
  • 생성날짜 (created_at) — default = now
  • 수정날짜 (modified_at) — default = now

UserOption (유저추가정보)

  • id — auto increment — Primary key — NOT NULL
  • 유저 아이디 (user_id) — not null — Foreign key → User.id — NOT NULL
  • 코어 (is_core) — not null, default = false
  • 서서 (is_stand) — not null, default = false
  • 앉아서 (is_sit) — not null, default = false
  • 팔 (is_arm) — not null, default = false
  • 엎드려서 (is_recline) — not null, default = false
  • 밸런스 (is_balance) — not null, default = false
  • 성별 (gender) — not null, default = none
  • 키 (height) — not null, default = 0
  • 몸무게 (weight) — not null, default = 0
  • 생성일시 (created_at) — default = now
  • 수정일시 (modified_at) — default = now

course_hash_tag (코스 해쉬태그 연결)

  • pk (id) — auto increment — Primary key — NOT NULL
  • 코스아이디 (course_id) — not null — Foreign key → Course.pk — NOT NULL
  • 태그아이디 (tag_id) — not null — Foreign key → Tag.pk — NOT NULL