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


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

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

public class AdMappingMapper implements RowMapper<AdMapping> {
    @Override
    public AdMapping map(ResultSet rs, StatementContext ctx) throws SQLException {
        return AdMapping.builder()
                .af_ad_group_id(rs.getString("af_ad_group_id"))
                .af_ad_group_name(rs.getString("af_ad_group_name"))
                .af_ad_plan_id(rs.getString("af_ad_plan_id"))
                .af_ad_plan_name(rs.getString("af_ad_plan_name"))
                .af_ad_id(rs.getString("af_ad_id"))
                .af_ad_name(rs.getString("af_ad_name"))
                .build();
    }
}
