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


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

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

public class MediaCampaignMapper implements RowMapper<MediaCampaign> {
    @Override
    public MediaCampaign map(ResultSet rs, StatementContext ctx) throws SQLException {
        return MediaCampaign.builder()
                .campaign(rs.getString("af_group_id"))
                .media_source(rs.getString("af_media_id"))
                .af_group_name(rs.getString("af_group_name"))
                .build();
    }
}
