UMC11th_WEB_BE_1W

Tables (19)

food_category

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

inquiry

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • content — VARCHAR(2000) — NOT NULL
  • category — VARCHAR(50) — NOT NULL
  • status — ENUM('pending', 'answered', 'closed') — NOT NULL
  • response_content — VARCHAR(2000)
  • created_at — DATETIME — NOT NULL
  • answered_at — DATETIME
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

inquiry_file

  • id — BIGINT — Primary key — NOT NULL
  • inquiry_id — BIGINT — Foreign key → inquiry.id — NOT NULL
  • file_url — VARCHAR(500) — NOT NULL
  • created_at — DATETIME — NOT NULL

interest

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

member

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(30) — NOT NULL
  • gender — ENUM('female', 'male', 'other')
  • birth_date — DATE
  • address — VARCHAR(255)
  • email — VARCHAR(255)
  • phone — VARCHAR(20)
  • point_balance — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

member_interest

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • interest_id — BIGINT — Foreign key → interest.id — NOT NULL
  • created_at — DATETIME — NOT NULL

member_mission

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.id — NOT NULL
  • status — ENUM('progress', 'complete', 'fail') — NOT NULL
  • progress_count — INT — NOT NULL — 미션의 목표 중 현재까지 달성한 개수
  • started_at — DATETIME — NOT NULL
  • completed_at — DATETIME
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_permission

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • advertisement_allowed — BOOLEAN — NOT NULL
  • location_allowed — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_region_reward

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • point_transaction_id — BIGINT — Foreign key → point_transaction.id — NOT NULL
  • completed_mission_count — INT — NOT NULL
  • reward_point — INT — NOT NULL
  • rewarded_at — DATETIME — NOT NULL

member_setting

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • mission_notice_enabled — BOOLEAN — NOT NULL
  • review_notice_enabled — BOOLEAN — NOT NULL
  • inquiry_notice_enabled — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

mission

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • content — VARCHAR(1000) — NOT NULL
  • target_count — INT — NOT NULL — 완료해야 하는 과제 또는 항목 수
  • reward_point — INT — NOT NULL
  • expires_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

point_transaction

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.id
  • region_id — BIGINT — Foreign key → region.id
  • transaction_type — ENUM('earn', 'use') — NOT NULL
  • reason_type — ENUM( 'mission', 'region_bonus', 'use', 'adjustment' ) — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • content — VARCHAR(500)
  • amount — BIGINT — NOT NULL
  • created_at — DATETIME — NOT NULL

region

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

social_account

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.id — NOT NULL
  • provider — ENUM('naver', 'google') — NOT NULL
  • provider_subject — VARCHAR(255) — NOT NULL — 소셜 로그인 제공자가 전달한 고유 사용자 식별자
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL

store

  • id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • latitude — DECIMAL(13, 10)
  • longitude — DECIMAL(13, 10)
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

store_image

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.id — NOT NULL
  • file_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

store_review

  • id — BIGINT — Primary key — NOT NULL
  • member_mission_id — BIGINT — Foreign key → member_mission.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • content — VARCHAR(2000) — NOT NULL
  • rating — DECIMAL(2, 1) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

store_review_file

  • id — BIGINT — Primary key — NOT NULL
  • store_review_id — BIGINT — Foreign key → store_review.id — NOT NULL
  • file_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • created_at — DATETIME — NOT NULL

store_review_reply

  • id — BIGINT — Primary key — NOT NULL
  • store_review_id — BIGINT — Foreign key → store_review.id — NOT NULL
  • content — VARCHAR(2000) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME