LOCAL_MISSION

Tables (8)

food_categories

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(50) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

member_missions

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • mission_id — BIGINT — Foreign key → missions.id — NOT NULL
  • status — VARCHAR(50) — NOT NULL
  • completed_date — TIMESTAMP
  • created_at — TIMESTAMP — NOT NULL

missions

  • id — BIGINT — Primary key — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • title — VARCHAR(100) — NOT NULL
  • description — TEXT — NOT NULL
  • reward_points — INT — NOT NULL
  • start_date — DATE — NOT NULL
  • end_date — DATE — NOT NULL
  • mission_type — VARCHAR(50) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

points

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • amount — INT — NOT NULL
  • type — VARCHAR(50) — NOT NULL
  • description — TEXT — NOT NULL
  • balance — INT — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

regions

  • id — BIGINT — Primary key — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • created_at — TIMESTAMP — NOT NULL

reviews

  • id — BIGINT — Primary key — NOT NULL
  • user_id — BIGINT — Foreign key → users.id — NOT NULL
  • store_id — BIGINT — Foreign key → stores.id — NOT NULL
  • rating — INT — NOT NULL
  • content — TEXT
  • image_url — TEXT
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

stores

  • id — BIGINT — Primary key — NOT NULL
  • region_id — BIGINT — Foreign key → regions.id — NOT NULL
  • food_category_id — BIGINT — Foreign key → food_categories.id — NOT NULL
  • name — VARCHAR(100) — NOT NULL
  • address — VARCHAR(255) — NOT NULL
  • phone — VARCHAR(20)
  • latitude — DECIMAL(10,8)
  • longitude — DECIMAL(11,8)
  • image_url — TEXT
  • rating — DECIMAL(3,2)
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL

users

  • id — BIGINT — Primary key — NOT NULL
  • nickname — VARCHAR(50) — NOT NULL
  • email — VARCHAR(255) — NOT NULL
  • phone_number — VARCHAR(20) — NOT NULL
  • profile_image_url — TEXT
  • bio — TEXT
  • is_deleted — BOOLEAN — NOT NULL
  • created_at — TIMESTAMP — NOT NULL
  • updated_at — TIMESTAMP — NOT NULL