package com.pandoli365.bibimbap.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.Map;

@Mapper
public interface GameReviewStatsMapper {

    @Select("""
            SELECT
                game_id        AS "gameId",
                avg_rating     AS "avgRating",
                review_count   AS "reviewCount",
                avg_immersion    AS immersion,
                avg_creativity   AS creativity,
                avg_controls     AS controls,
                avg_completeness AS completeness,
                avg_sound        AS sound,
                avg_visual       AS visual
            FROM game_review_stats
            WHERE game_id = #{gameId}
            """)
    Map<String, Object> getStats(long gameId);
}
