umc-week1

Tables (16)

food_categories

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • display_order — INT — NOT NULL
  • is_active — BOOLEAN — NOT NULL

member_food_preferences

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL
  • created_at — DATETIME — NOT NULL

member_missions

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • mission_id — BIGINT — Foreign key → missions.id — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • verification_code — VARCHAR(100)
  • assigned_at — DATETIME — NOT NULL
  • started_at — DATETIME
  • completed_at — DATETIME
  • expired_at — DATETIME

member_settings

  • id — BIGINT — Primary key — NOT NULL
  • member_id (id2) — BIGINT — Foreign key → members.id — NOT NULL
  • is_service_notification_enabled — BOOLEAN — NOT NULL
  • is_marketing_notification_enabled — BOOLEAN — NOT NULL
  • is_mission_notification_enabled — BOOLEAN — NOT NULL
  • updated_at — DATETIME — NOT NULL

member_term_agreements

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • term_id — BIGINT — Foreign key → terms.id — NOT NULL
  • is_agreed — BOOLEAN — NOT NULL
  • agreed_at — DATETIME — NOT NULL

members

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • email — VARCHAR(255)
  • gender — VARCHAR(20)
  • birth_date — DATE
  • address — VARCHAR(255)
  • profile_image_url — VARCHAR(500)
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

missions

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • description — TEXT
  • mission_type — VARCHAR(30) — NOT NULL
  • minimum_amount — DECIMAL(12, 2)
  • reward_point — INT — NOT NULL
  • available_from — DATETIME — NOT NULL
  • available_until — DATETIME — NOT NULL
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

notifications

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • member_mission_id — BIGINT — Foreign key → member_missions.id
  • notification_type — VARCHAR(30) — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • content — VARCHAR(500) — NOT NULL
  • read_at — DATETIME
  • created_at — DATETIME — NOT NULL

point_transactions

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • member_mission_id — BIGINT — Foreign key → member_missions.id
  • transaction_type — VARCHAR(30) — NOT NULL
  • point_amount — INT — NOT NULL
  • description — VARCHAR(255)
  • created_at — DATETIME — NOT NULL

review_images

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

reviews

  • id — BIGINT — Primary key — NOT NULL
  • rating — TINYINT — NOT NULL
  • content — TEXT
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME
  • id (id2) — BIGINT — Foreign key → member_missions.id — NOT NULL

social_accounts

  • id — BIGINT — Primary key — NOT NULL
  • member_id — BIGINT — Foreign key → members.id — NOT NULL
  • provider — VARCHAR(20) — NOT NULL
  • provider_user_id — VARCHAR(255) — NOT NULL
  • created_at — DATETIME — NOT NULL

store_food_categories

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL

store_images

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • image_url — VARCHAR(500) — NOT NULL
  • display_order — INT — NOT NULL
  • is_representative — BOOLEAN — NOT NULL
  • created_at — DATETIME — NOT NULL

stores

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • description — TEXT
  • phone — VARCHAR(30)
  • address — VARCHAR(255) — NOT NULL
  • detail_address — VARCHAR(255)
  • latitude — DECIMAL(10, 7) — NOT NULL
  • longitude — DECIMAL(10, 7) — NOT NULL
  • business_hours — VARCHAR(255)
  • status — VARCHAR(20) — NOT NULL
  • created_at — DATETIME — NOT NULL
  • updated_at — DATETIME — NOT NULL
  • deleted_at — DATETIME

terms

  • id — BIGINT — Primary key — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • version — VARCHAR(20) — NOT NULL
  • content — TEXT — NOT NULL
  • is_required — BOOLEAN — NOT NULL
  • effective_at — DATETIME — NOT NULL
  • created_at — DATETIME — NOT NULL