package com.pandoli365.bibimbap.mapper;

import com.pandoli365.bibimbap.data.JamCriterionData;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface JamCriteriaMapper {

    @Select("""
            SELECT
                criterion_key AS criterionKey,
                display_name AS displayName,
                sort_order AS sortOrder,
                weight
            FROM jam_criteria
            WHERE jam_id = #{jamId}
            ORDER BY sort_order, criterion_key
            """)
    List<JamCriterionData> listByJam(long jamId);
}
