ㅁ
Tables (23)
action
- action_id — BIGINT — Primary key — NOT NULL
- category — ENUM('DISCOUNT', 'DONATION', 'PROMOTION') — NOT NULL
- promotion_type — ENUM('INFLUENCER', 'SNS', 'FLYER', 'REFERRAL')
- cost — BIGINT — NOT NULL
- capture_rate — FLOAT — NOT NULL
- visitor_bonus — FLOAT — NOT NULL
- cooldown — INT — NOT NULL
- daily_limit — INT — NOT NULL — 1일 사용 제한 (0=무제한)
action_log
- action_log_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → store.store_id — NOT NULL
- action_id — BIGINT — Foreign key → action.action_id — NOT NULL
- game_day — INT — NOT NULL
- cost — BIGINT — NOT NULL
- discount_rate — INT
- donation_quantity — INT
- capture_rate — FLOAT
- visitor_rate — FLOAT
- created_at — DATETIME — NOT NULL
daily_event
- season_event_id — BIGINT — Primary key — NOT NULL
- season_id — BIGINT — Foreign key → season.season_id — NOT NULL
- event_id — BIGINT — Foreign key → random_event.event_id — NOT NULL
- day — INT — NOT NULL
- news_title — VARCHAR(120) — NOT NULL
daily_report
- report_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — Foreign key → store.store_id — NOT NULL
- day — INT — NOT NULL — 0~6
- revenue — BIGINT — NOT NULL — 총 매출 (원)
- total_cost — BIGINT — NOT NULL — 비용 합계
- net_profit — BIGINT — NOT NULL — 순이익 (음수=적자)
- visitors — INT — NOT NULL — 방문객 수
- sales_count — INT — NOT NULL — 판매 수량
- stock_remaining — INT — NOT NULL — 남은 재고
- stock_disposed_count — INT — NOT NULL — 폐기 재고 (2일 이상)
- reputation_score — FLOAT — NOT NULL — 현재 평판 (0.0~5.0)
- reputation_change — FLOAT — NOT NULL — 전일 대비 변동
- consecutive_deficit_days — INT — NOT NULL — 연속 적자 일수 (0~3)
- is_bankrupt — BOOLEAN — NOT NULL — deficit_days >= 3
- is_next_day_order_day — BOOLEAN — 마지막 Day면 NULL
- created_at — DATETIME — NOT NULL — 마감 시 자동 생성
festival
- festival_id — BIGINT — Primary key — NOT NULL
- location_id — BIGINT — NOT NULL
- festival_name — VARCHAR(255) — NOT NULL
- population_rate — FLOAT — NOT NULL
item
- item_id — BIGINT — Primary key — NOT NULL
- item_name — VARCHAR(100) — NOT NULL
- category — ENUM('INGREDIENT_DISCOUNT', 'RENT_DISCOUNT') — NOT NULL
- point — INT — NOT NULL
- discount_rate — FLOAT — NOT NULL
item_user
- item_id — BIGINT — Foreign key → item.item_id — NOT NULL
- store_id — BIGINT — Foreign key → store.store_id — NOT NULL
- is_purchased — BOOLEAN — NOT NULL
location
- location_id — BIGINT — Primary key — NOT NULL
- location_name — VARCHAR(50) — NOT NULL
- rent — BIGINT — NOT NULL — 임대료 (원)
menu
- menu_id — BIGINT — Primary key — NOT NULL
- menu_name — VARCHAR(50) — NOT NULL
- menu_price — BIGINT — NOT NULL — 판매가
- origin_price — BIGINT — NOT NULL — 원가
news_article
- news_id — BIGINT — Primary key — NOT NULL
- news_report_id — BIGINT — Foreign key → news_report.news_report_id — NOT NULL
- news_title — VARCHAR(200) — NOT NULL
- news_content — TEXT — NOT NULL
- popular_menu — VARCHAR(50) — NOT NULL
- created_at — DATETIME — NOT NULL
news_report
- news_report_id — BIGINT — Primary key — NOT NULL
- season_id — BIGINT — Foreign key → season.season_id — NOT NULL
- day — INT — NOT NULL
- today_trend — VARCHAR(50) — NOT NULL
- area_revenue_ranking — JSON — NOT NULL
- area_traffic_ranking — JSON — NOT NULL
- menu_price_change — JSON — NOT NULL
- created_at — DATETIME — NOT NULL
orders
- order_id — BIGINT — Primary key — NOT NULL
- menu_id — BIGINT — Foreign key → menu.menu_id — NOT NULL
- store_id — BIGINT — Foreign key → store.store_id — NOT NULL
- quantity — INT — NOT NULL
- total_cost — BIGINT — NOT NULL
- status — ENUM('CONFIRMED', 'PENDING') — NOT NULL
- ordered_day — INT — NOT NULL
- created_at — DATETIME — NOT NULL
population
- id — BIGINT — Primary key — NOT NULL
- location_id — BIGINT — NOT NULL
- date — DATETIME — NOT NULL
- floating_population — INT — NOT NULL
random_event
- event_id — BIGINT — Primary key — NOT NULL
- event_category — ENUM('GOOD', 'BAD') — NOT NULL
- event_type — VARCHAR(50) — NOT NULL — 연예인 등장, 정부지원금 등
- start_time — ENUM('IMMEDIATE', 'NEXT_DAY') — NOT NULL
- end_time — ENUM('SAME_DAY', 'SEASON_END') — NOT NULL
- population_rate — FLOAT — NOT NULL
- stock_flat — FLOAT — NOT NULL
- cost_rate — FLOAT — NOT NULL
- capital_flat — FLOAT — NOT NULL
season
- season_id — BIGINT — Primary key — NOT NULL — 시즌 고유 ID
- status — ENUM('SCHEDULED', 'IN_PROGRESS', 'FINISHED') — NOT NULL
- total_days — INT — NOT NULL — 시즌 총 일수
- start_time — DATETIME — NOT NULL — 시즌 시작 시각
- end_time — DATETIME — NOT NULL — 시즌 종료 시각
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
season_log
- season_log_id — BIGINT — Primary key — NOT NULL
- season_id — BIGINT — NOT NULL
- current_day — INT — NOT NULL — 현재 Day (0~6 or 0~13)
- current_phase — VARCHAR(20) — NOT NULL — WAITING / PREP / BUSINESS / CLOSING / FINISHED
- phase_end_time — DATETIME — NOT NULL — FE 카운트다운 기준
- total_players — INT — NOT NULL — 현재 참여 인원
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
season_ranking_record
- season_ranking_record_id — BIGINT — Primary key — NOT NULL
- store_id — BIGINT — NOT NULL
- final_rank — INT — NOT NULL — 최종 순위
- reputation_score — FLOAT — NOT NULL — 최종 평판 (0.0~5.0)
- total_revenue — BIGINT — NOT NULL — 총 매출 (원)
- total_cost — BIGINT — NOT NULL — 총 지출 (원)
- total_net_profit — BIGINT — NOT NULL — 총 순이익 (원)
- total_visitors — INT — NOT NULL — 총 방문객 수
- roi — FLOAT — NOT NULL — ROI (%)
- days_played — INT — NOT NULL — 실제 플레이 Day 수
- reward_points — INT — NOT NULL — 보상 포인트
- is_bankrupt — BOOLEAN — NOT NULL
- created_at — DATETIME — NOT NULL
store
- store_id — BIGINT — Primary key — NOT NULL
- user_id — BIGINT — Foreign key → user.user_id — NOT NULL
- location_id — BIGINT — Foreign key → location.location_id — NOT NULL
- season_id — BIGINT — Foreign key → season.season_id — NOT NULL
- store_name — VARCHAR(50) — NOT NULL
- balance — BIGINT — NOT NULL — 잔고 (원 단위)
- current_day — INT — NOT NULL
- capture_rate — FLOAT — NOT NULL
- updated_at — DATETIME — NOT NULL
store_menu
- store_id — BIGINT — Foreign key → store.store_id — NOT NULL
- menu_id — BIGINT — Foreign key → menu.menu_id — NOT NULL
- current_stock — INT — NOT NULL
- ordered_stock — INT — NOT NULL
- sell_price — BIGINT — NOT NULL
- updated_at — DATETIME — NOT NULL
traffic
- traffic_id — BIGINT — Primary key — NOT NULL
- location_id — BIGINT — NOT NULL
- traffic_status — ENUM('SMOOTH', 'NORMAL', 'CONGESTED', 'BLOCKED') — NOT NULL
- date — DATETIME — NOT NULL
user
- user_id — BIGINT — Primary key — NOT NULL
- email — VARCHAR(50) — NOT NULL
- nickname — VARCHAR(50) — NOT NULL
- provider — ENUM('google', 'ssafy') — NOT NULL
- point — INT — NOT NULL
- provider_user_id — VARCHAR(255) — NOT NULL
- created_at — DATETIME — NOT NULL
- updated_at — DATETIME — NOT NULL
weather
- weather_id — BIGINT — Primary key — NOT NULL
- weather_type — ENUM('SUNNY','RAIN','SNOW','HEATWAVE','COLDWAVE','FOG') — NOT NULL
- population_percent — FLOAT — NOT NULL
weather_menu
- weather_id — BIGINT — Foreign key → weather.weather_id — NOT NULL
- menu_id — BIGINT — Foreign key → menu.menu_id — NOT NULL
- menu_sales_rate — FLOAT — NOT NULL — 0.2