study1 주/가게 방문 미션
테이블 (8)
가게 (stores)
- Key (store_id) — int — 기본 키 — NOT NULL
- Key (region_id) — int — 외래 키 → 지역.Key — NOT NULL
- Field (store_name) — varchar(55)
- Field (store_address) — varchar(255)
- Field (created_at) — datetime(6)
- Field2 (updated_at) — datetime(6)
미션 (missions)
- Key (missions_id) — int — 기본 키 — NOT NULL
- Key (store_id) — int — 외래 키 → 가게.Key — NOT NULL
- Key (region_id) — int — 외래 키 → 가게.Key — NOT NULL
- Field (missions_name) — varchar(50)
- Field (point_reward) — int
- Field (created_at) — datetime(6)
- Field2 (updated_at) — datetime(6)
사용자 미션 (user_missions)
- Key (user_mission_id) — bigint — 기본 키 — NOT NULL
- Key (user_id) — bigint — 외래 키 → 사용자 정보.Key — NOT NULL
- Key (missions_id) — int — 외래 키 → 미션.Key — NOT NULL
- Key (store_id) — int — 외래 키 → 미션.Key — NOT NULL
- Key (region_id) — int — 외래 키 → 미션.Key — NOT NULL
- Key (point_id) — int — 외래 키 → 포인트.Key — NOT NULL
- Field (status) — enum('in_progress','completed')
- Field (body) — text
- Field (title) — varchar(55)
- Field (created_at) — datetime(6)
- Field2 (updated_at) — datetime(6)
사용자 정보 (users)
- Key (user_id) — bigint — 기본 키 — NOT NULL
- Field (name) — varchar(55)
- Field (gender) — enum('남성', '여성')
- Field (birthdate) — date
- Field (address) — varchar(255)
- Field (email) — varchar(55)
- Field (nickname) — varchar(55)
- Field (created_at) — datetime(6)
- Field (updated_at) — datetime(6)
- Field (inactive_date) — datetime(6)
선호 음식 (preferences)
- Key (preference_id) — int — 기본 키 — NOT NULL
- Key (user_id) — bigint — 외래 키 → 사용자 정보.Key — NOT NULL
- Field (food_type) — enum('한식','일식','중식,'양식','치킨','분식','고기/구이','도시락','야식','패스트푸드','디저트','아시안푸드')
- Field (created_at) — datetime(6)
- Field (updated_at) — datetime(6)
알림 (alarm)
- Key (alarm_id) — int — 기본 키 — NOT NULL
- Key (user_id) — bigint — 외래 키 → 사용자 정보.Key — NOT NULL
- Field (alarm_type) — enum('new_missions','review_request')
- Field (message) — text
- 알림이 생성된 시간 (created_at) — datetime(6)
- 읽음 여부 (is_read) — boolean
지역 (regions)
- Key (region_id) — int — 기본 키 — NOT NULL
- Field (region_name) — varchar(55)
포인트 (points)
- Key (point_id) — int — 기본 키 — NOT NULL
- Key (user_id) — bigint — 외래 키 → 사용자 정보.Key — NOT NULL
- Field (total_points) — int
- Field (missions_id) — int
- Field (created_at) — datetime(6)
- Field2 (updated_at) — datetime(6)