UMC 1WEEK

Tables (13)

food_category

  • food_category_id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • display_order — INT — NOT NULL
  • is_active — BOOLEAN — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

member

  • member_id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.region_id
  • name — VARCHAR(50) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • gender — VARCHAR(20) — NOT NULL — NONE, MALE, FEMALE
  • birth_date — DATE
  • email — VARCHAR(255)
  • phone_number — VARCHAR(30)
  • address — VARCHAR(255)
  • detail_address — VARCHAR(255)
  • profile_image_url — VARCHAR(500)
  • total_point — INT — NOT NULL
  • member_status — VARCHAR(20) — NOT NULL — ACTIVE, WITHDRAWN, SUSPENDED
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

member_food_category

  • member_food_category_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.food_category_id — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

member_mission

  • member_mission_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • mission_id — BIGINT — Foreign key → mission.mission_id — NOT NULL
  • member_mission_status — VARCHAR(20) — NOT NULL — IN_PROGRESS, SUCCESS_REQUESTED, COMPLETED, FAILED, CANCELED
  • proof_code — VARCHAR(30) — Mission verification number shown on the success request screen
  • receipt_amount — INT
  • started_at — DATETIME(6) — NOT NULL
  • success_requested_at — DATETIME(6)
  • completed_at — DATETIME(6)
  • canceled_at — DATETIME(6)
  • failed_reason — VARCHAR(255)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

member_terms_agreement

  • member_terms_agreement_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • terms_id — BIGINT — Foreign key → terms.terms_id — NOT NULL
  • is_agreed — BOOLEAN — NOT NULL
  • agreed_at — DATETIME(6) — NOT NULL
  • revoked_at — DATETIME(6)

mission

  • mission_id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • description — VARCHAR(255) — NOT NULL
  • minimum_amount — INT — NOT NULL
  • reward_point — INT — NOT NULL
  • max_participant_count — INT
  • current_participant_count — INT — NOT NULL
  • mission_status — VARCHAR(20) — NOT NULL — ACTIVE, PAUSED, ENDED
  • started_at — DATETIME(6) — NOT NULL
  • ended_at — DATETIME(6) — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

region

  • region_id — BIGINT — Primary key — NOT NULL
  • parent_region_id — BIGINT — Foreign key → region.region_id
  • name — VARCHAR(100) — NOT NULL
  • depth — TINYINT — NOT NULL — 1=sido, 2=sigungu, 3=dong/eup/myeon
  • display_order — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

review

  • review_id — BIGINT — Primary key — NOT NULL
  • member_mission_id — BIGINT — Foreign key → member_mission.member_mission_id — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • rating — DECIMAL(2,1) — NOT NULL
  • content — TEXT — NOT NULL
  • owner_reply_content — TEXT
  • owner_replied_at — DATETIME(6)
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

review_image

  • review_image_id — BIGINT — Primary key — NOT NULL
  • review_id — BIGINT — Foreign key → review.review_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

social_account

  • social_account_id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → member.member_id — NOT NULL
  • provider — VARCHAR(20) — NOT NULL — KAKAO, NAVER, APPLE, GOOGLE
  • provider_user_id — VARCHAR(255) — NOT NULL
  • provider_email — VARCHAR(255)
  • connected_at — DATETIME(6) — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL

store

  • store_id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → region.region_id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_category.food_category_id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • phone_number — VARCHAR(30)
  • address — VARCHAR(255) — NOT NULL
  • detail_address — VARCHAR(255)
  • introduction — TEXT
  • business_hours — VARCHAR(255)
  • average_rating — DECIMAL(2, 1) — NOT NULL
  • review_count — INT — NOT NULL
  • store_status — VARCHAR(20) — NOT NULL — OPEN, CLOSED, HIDDEN
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL
  • deleted_at — DATETIME(6)

store_image

  • store_image_id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → store.store_id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • image_type — VARCHAR(20) — NOT NULL — STORE, MENU
  • display_order — INT — NOT NULL
  • created_at — DATETIME(6) — NOT NULL

terms

  • terms_id — BIGINT — Primary key — NOT NULL
  • code — VARCHAR(50) — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • terms_type — VARCHAR(30) — NOT NULL — SERVICE, PRIVACY, LOCATION, MARKETING
  • version — VARCHAR(30) — NOT NULL
  • content_url — VARCHAR(500)
  • is_required — BOOLEAN — NOT NULL
  • effective_at — DATETIME(6) — NOT NULL
  • created_at — DATETIME(6) — NOT NULL
  • updated_at — DATETIME(6) — NOT NULL