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


import com.fshark.overseas.advert.entity.GameAccount;
import org.jdbi.v3.core.mapper.RowMapper;
import org.jdbi.v3.core.statement.StatementContext;

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

public class GameAccountMapper implements RowMapper<GameAccount> {
    @Override
    public GameAccount map(ResultSet rs, StatementContext ctx) throws SQLException {
        return GameAccount.builder()
                .gameId(rs.getString("game_id"))
                .did(rs.getString("did"))
                .platform(rs.getString("platform"))
                .mediaSource(rs.getString("media_source"))
                .event_type(rs.getString("event_type"))
                .event_time(rs.getString("event_time"))
                .build();
    }
}
