package com.fshark.overseas.advert.entity.mapper;


import com.fshark.overseas.advert.modle.mapping.Game;
import com.fshark.overseas.advert.modle.mapping.Media;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;

import java.sql.ResultSet;
import java.sql.SQLException;

public class GameMapper implements RowMapper<Game> {

    @Override
    public Game map(ResultSet rs, StatementContext ctx) throws SQLException {
        return Game.builder()
                .afAppId(rs.getString("af_app_id"))
                .rate(rs.getDouble("rate"))
                .build();
    }
}
